Animation is not changing
#1

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.
Reply
#2

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.
Reply
#3

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)