the npc not move - 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: the npc not move (
/showthread.php?tid=346420)
the npc not move -
peterory - 28.05.2012
i use ApplyAnimation to command the npc do a run animation
but it just stand there and do that animation again and again
how to let that Npc ApplyAnimation to move?
![Smiley](images/smilies/smile.png)
do not use setplayerpos
it will be fly and cross the wall
Re: the npc not move -
iggy1 - 28.05.2012
In the apply animation function, make sure these are the values of the params.
freeze = 0
lockx = 0
locky = 0
Should work. If it doesn't post your "ApplyAnimation" line.
Re: the npc not move -
peterory - 28.05.2012
Quote:
Originally Posted by iggy1
In the apply animation function, make sure these are the values of the params.
freeze = 0
lockx = 0
locky = 0
Should work. If it doesn't post your "ApplyAnimation" line.
|
very thanks! but have another problem
it do that animation and then back to he's spawn postion .....
can you help me ...
ApplyAnimation(playerid,"ped","run_player",4.1,1,0 ,0,1,1,1);
Re: the npc not move -
iggy1 - 28.05.2012
freeze should be 0.
Yours is 1.
3rd to last param is freeze.
iggy1 -
peterory - 28.05.2012
i will online watting.....
Quote:
Originally Posted by iggy1
freeze should be 0.
Yours is 1.
|
if the freeze is 0 that npc will not move and not do anything....
just standing
Re: the npc not move -
iggy1 - 28.05.2012
My bad set lockx and locky back to 1. (oops)
One sec i'll post the line...
pawn Код:
ApplyAnimation(playerid,"ped","run_player",4.1,1,1,1,0,0,1);//note i have set time from one millisecond to infinite loop
Sorry bwt that.
Hopefully that will work.
iggy1 -
peterory - 28.05.2012
Quote:
Originally Posted by iggy1
My bad set lockx and locky back to 1. (oops)
One sec i'll post the line...
pawn Код:
ApplyAnimation(playerid,"ped","run_player",4.1,1,1,1,0,0,1);//note i have set time from one millisecond to infinite loop
Sorry bwt that.
|
ok you are a good man
you make some many time to learn me
i wait for you
Quote:
Originally Posted by iggy1
My bad set lockx and locky back to 1. (oops)
One sec i'll post the line...
pawn Код:
ApplyAnimation(playerid,"ped","run_player",4.1,1,1,1,0,0,1);//note i have set time from one millisecond to infinite loop
Sorry bwt that.
Hopefully that will work.
|
![Sad](images/smilies/sad.gif)
it still stand in one place and do the job...
Re: the npc not move -
iggy1 - 28.05.2012
I'm not sure if you can do it with NPCs.
I just looked at an include for controllable NPCs and the way that does it is by creating an object moving that and setting the NPCs pos on the object.