Page 1 of 1

rotation?

PostPosted: Wed Oct 14, 2009 8:19 pm
by travisabyss
is there any way with game editor ot make an actor rotate?

Re: rotation?

PostPosted: Fri Nov 06, 2009 9:44 pm
by krenisis
yes ok using ur paint program draw ur actor as if he is rotating frame by frame...insert ur actor and make sure u have the right amount of horozontal and verticule frames

Re: rotation?

PostPosted: Sun Nov 08, 2009 8:22 pm
by Fojam
double newangle = (animpos/nframes)*360;
vectoradd(&angle, &directional_velocity, newangle, 0.5001);
1.) put this in ^ after you make an animated gif of the object turning 360 to the left starting from it facing to the right.
(sorry, I can't remember what event you put it in... I think someone else can help you there, though)I think that it is a script editor in the left and right arrow key events, but I am not sure. it might also be in draw actor... tell me which one works.

2.) do key down: left arrow key>change animation to object turning left direction: no change and have repeat enable and immediate action.

3.) then do key up: left arrow key> change animation direction to stopped, immediate action

4.) do a key down: right arrow key>change animation direction to backwards and do immediate action

5.) then do key up: right arrow key> change animation direction to stopped, immediate action

Moving forwards and backwards

1.) Make a key down: up arrow key> In script editor, write:
directional_velocity = directional_velocity + whatever speed you want it to go forwards;

2.) Make a key up: up arrow key> in script editor, write:
directional velocity = 0;

3.) Make a key down: down arrow key> in script editor, write:
directional_velocity = directional_velocity - Whatever speed you want it to go backwards;

4.) Make a key up: down arrow key> in script editor write:
directional_velocity = 0;


you should be able to do it if you follow these instructions exactly.
if you have any problems, tell me.

There are a couple of sprite rotation programs out there. One of them is rotsprite, which is made with game editor.
I am not sure where to download it, but i think that it is somewhere out on the forums.


Good Luck with your game!


Edit: I found the link on the forums: viewtopic.php?f=8&t=6218