Page 1 of 1

getting a spear to change the animation frame depending on

PostPosted: Wed Jan 10, 2007 9:24 pm
by Sgt. Sparky
direction, could you please Help? here is the code i have an the create actor event
Code: Select all
angle = direction(xscreen, yscreen, Coca.xscreen, Coca.xscreen);
directional_velocity = 25;
and on the draw actor event I have this
Code: Select all
animindex = direction(xscreen, yscreen, Coca.xscreen, Coca.xscreen)*360;
what is the error on the draw actor Event?
Edit: I changed it to nframes but it still will not work, there are 360 frames in the animation.

PostPosted: Wed Jan 10, 2007 9:46 pm
by makslane
To change the animation frame you must use the animpos variable.

PostPosted: Wed Jan 10, 2007 9:47 pm
by Sgt. Sparky
okay! :D
edit :THANK YOU!

PostPosted: Wed Jan 10, 2007 10:20 pm
by Game A Gogo
the animindex var is read only, so you cant change it.