View Full Version : Animation stops when player receive damage.

15/07/2017, 12:10 AM
Let say I apply an animation to player 1, here is my code for example.

TogglePlayerControllable(playerid, 0);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
ApplyAnimation(playerid, "PARACHUTE", "FALL_skyDive_DIE ", 4.1, 0, 1, 1, 1, 1000, 1);

The problem is that if player 2 comes by and kicks the player, attack him, melee or weapon, player 1 gets out of the animation.
I suspect it has something to do with the animation of the player when he receives damage.
Do you think there is a way to lock the animation?
I have been trying and researching for a while now.
Thank you.

15/07/2017, 01:15 AM
Using SetPlayerTeam you can put two players in the same team which will stop the other player to get damage.
When standing still you still do the "tumble" anim etc, but any animation that gets applied will not be interrupted (that only happens on incoming damage).

Oh, and the player that plays the animation must also be frozen using TogglePlayerControllable().