06.08.2012, 09:48
Hi guys,
I'm currently working on a new system, but I'm struggling with a couple of things. I'm making a system where you collect a package, and you have to carry it. Here's the code I used for attaching the object and making the carry animation:
That bit its self works, but then there's bugs after it. If I sprint, the animation stops so the package just floats on the player. If I jump, it does the same thing, so I've got it if you jump and/or sprint you drop the package and the animation stops. Dropping the package works, but the stopping the animation either freezes the player in the animation, or keeps the animation going but doesn't freeze you.
I use this code to stop the animation:
I also use the default ClearAnimations(playerid); call.
I can't see why it wouldn't stop the animation and why it would freeze the player in some cases.
I'm currently working on a new system, but I'm struggling with a couple of things. I'm making a system where you collect a package, and you have to carry it. Here's the code I used for attaching the object and making the carry animation:
pawn Код:
SetPlayerAttachedObject( playerid, 9, 1575, 1, -0.064613, 0.520760, 0.000000, 0.000000, 84.217391, 0.000000, 1.000000, 1.000000, 1.000000 );
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 1, 1, 1, 1, 1);
I use this code to stop the animation:
pawn Код:
StopLoopingAnim(playerid)
{
gPlayerUsingLoopingAnim[playerid] = 0;
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
}
I can't see why it wouldn't stop the animation and why it would freeze the player in some cases.