the npc not move
#1

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?
do not use setplayerpos
it will be fly and cross the wall
Reply
#2

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

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);
Reply
#4

freeze should be 0.

Yours is 1.

3rd to last param is freeze.
Reply
#5

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
Reply
#6

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

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.
it still stand in one place and do the job...
Reply
#8

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


Forum Jump:


Users browsing this thread: 2 Guest(s)