NPC animation doesn't work - Help!
#1

Ok so for some reason the NPC SHOULD be looping through the drunk walk animation, however it is not doing the animation at all. (This is just a blank NPC it does not use a recording nor do I want it to use a recording). I am aware that this animation will not make the NPC move I just want it to be applied when it spawns (I'm geussing the NPC will just drunk walk on the spot or something).

All I want is the NPC to do the animation when it spawns, which is not happening for some odd reason.

Код:
public OnPlayerSpawn(playerid)
{
	if(IsPlayerNPC(playerid))
	{
	ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
	}
    return 1;
}
(NOTE: I have searched and found similar topics having the same problem - however I did not find a solution.)


Thanks in advance.
Reply
#2

use NPC generator
Reply
#3

Quote:
Originally Posted by Mehtab
Посмотреть сообщение
use NPC generator
Where do I find this?
Reply
#4

next time ****** it. CLICKHERE
Reply
#5

I think if you preload animations before applying them while recording your NPC will do the animation
pawn Код:
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0,1);
animlib is a string containing the animation library you wish to preload
Reply
#6

Quote:
Originally Posted by Rachael
Посмотреть сообщение
I think if you preload animations before applying them while recording your NPC will do the animation
pawn Код:
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0,1);
animlib is a string containing the animation library you wish to preload
This didn't work.


Trying Mehtab's suggestion now, will edit this post with the results.


[EDIT: I'm not sure I understand what good that NPC creator would do, it just looks like an easier way to give your NPC a skin and weapon, how does this help me make it do an animation?]
Reply
#7

Still no solution?

I thought it wouldn't have been this hard to make an NPC to an animation (it doesn't have to be the drunk walk it could be anything at all) - I'm planning on coding the NPC to move while doing a walking animation, but first I have to try and get the NPC to do the animation....

Anyone got ideas on how to make this work? (Or a working peice of code..)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)