SA-MP Forums Archive
Animation is not changing - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Animation is not changing (/showthread.php?tid=497351)



Animation is not changing - Shoulen - 26.02.2014

Hi there, and thanks for reading.

I have a small animation problem and I think it may be related to the specific animation.
There is a function that sets this anim to a player:

pawn Код:
ApplyAnimation(npcid,"PED","WALK_DRUNK",4.1,1,1,1,1,0,1);
It works fine but later on I need the run this anim on the player (while the WALK_DRUNK anim is running)

pawn Код:
ApplyAnimation(npcid,"MISC", "GRAB_L",4.1,0,1,1,0,,1);
it does not work.

However, when I try to run the "GRAB_L" anim with this walking style:

pawn Код:
ApplyAnimation(npcid,"PED","WALK_fatold",4.1,1,1,1,1,0,1);
It works.

Why would this be happening?

I've tried to ClearAnimations(); but it doesn't do anything.


Respuesta: Animation is not changing - CuervO - 26.02.2014

Most likely you have not preloaded the animation libraries. You've got to apply an animation of each library when the player spawns so the animation library is preloaded to the client. I don't know if forcesync does this already.

https://sampwiki.blast.hk/wiki/ApplyAnimation

Also, you are missing a parameter in the second example.


Re: Respuesta: Animation is not changing - Shoulen - 27.02.2014

Quote:
Originally Posted by CuervO
Посмотреть сообщение
Most likely you have not preloaded the animation libraries. You've got to apply an animation of each library when the player spawns so the animation library is preloaded to the client. I don't know if forcesync does this already.

https://sampwiki.blast.hk/wiki/ApplyAnimation

Also, you are missing a parameter in the second example.
I feel it might be necessary to add in that the animations are performed on NPCs.
Saying that, I preloaded the animations for each player and NPC and when it came to apply the first anim
Код:
ApplyAnimation(npcid,"PED","WALK_DRUNK",4.1,1,1,1,1,0,1);
It worked great, however, when it came to do this:

Код:
ApplyAnimation(npcid,"MISC", "GRAB_L",4.1,0,1,1,0,600,1);
Which I ran while the "WALK_DRUNK" anim was running it simply carried on doing the "WALK_DRUNK" anim and nothing else, however. Randomly when I did this:

Код:
ApplyAnimation(npcid,"FOOD","EAT_Vomit_P",4.1,0,1,1,1,0,1);
It would overlap the other anim and work.

Why does it do this?