Directional_velocity works with angles
Goal: Use <- & -> arrow key to turn car clockwise or anticlockwise
use /\ & \/ arrow key to accelerate and decelerate respectively.
Create your car(s) actor then load 8 multiple animation files ("anim00*x*.imgfile") rotated with 45° difference
In an create actor script: Change Anim direction"stopped"
In a key down script : left (right): Change Anim Dir "forward"("backward")
//Based on the degree difference between sprites
in a key down script up ( down) -> Script Editor:
- Code: Select all
directional_velocity =5; //for the brackets...
directional_velocity =-5; // They works with the direction of the angle
key up left or right: Change anim directioj "stopped"
Key up Up or down :
- Code: Select all
directional_velocity =0;
in a draw actor script:
- Code: Select all
angle = animpos * 45 // if animpos is 1 angle is 45 etc.
If you still don't get it here is a eemo \/