Page 1 of 1

I Don't Know How To...

PostPosted: Tue Jul 14, 2009 9:17 pm
by DoubleD
I'm trying to make a sonic game, but I don't know how to get the characters to go through the loop. Can I get some help? Please.

Re: I Don't Know How To...

PostPosted: Wed Jul 15, 2009 12:20 pm
by DarkParadox
well, you could have 36,90, or 360 sprites of sonic rotating (first sprite of his head facing right and he must rotate counter clockwise), and find ferals stickto(); function.
Basicly, activate stickto when you get to the loop, and use this code to choose the rotation sprite:
Code: Select all
animpos=direction(xprevious,yprevious,x,y);//for 360

Code: Select all
angle=direction(xprevious,yprevious,x,y);//for 90
animpos=angle/4;

Code: Select all
angle=direction(xprevious,yprevious,x,y);//for 36
animpos=angle/10;