Page 1 of 1

Changing animation on path.

PostPosted: Wed Jul 05, 2006 2:44 pm
by Hyperyon
Is it possible for my player to change animations when turned right and left on a path?

PostPosted: Thu Jul 06, 2006 1:07 am
by Game A Gogo
use:
Code: Select all
animpos=angle*nframes/360;

PostPosted: Thu Jul 06, 2006 7:34 am
by Hyperyon
Thanks. I'll get on that :P

PostPosted: Thu Jul 06, 2006 3:31 pm
by Hyperyon
Ok, I made a path for my actor then typed that code in script editor. Gave me no errors, however nothing happend:(

PostPosted: Thu Jul 06, 2006 4:50 pm
by Novice
Thats because that's not the right code, use:
Code: Select all
if (xvelocity>0) change animation("right")
else if (xvelocity<0) change animation("left")

WARNING this is pseudo code!!! :wink:

PostPosted: Thu Jul 06, 2006 5:46 pm
by Game A Gogo
i tought that all the animations was in one animation.

PostPosted: Thu Jul 06, 2006 6:25 pm
by Hyperyon
Thanks alot guys! I'll built monuments in youre honor! :D