Hi all,
I'm making a game where you use the left and right keys to move. However... I would like to know how to make it tilt slightly towards the direction that it is heading (left or right), then make it return to upright position when the key is release. I think this needs to be done with variables, but I'm new to variables so would appreciate any help.
Thanks in advance!
Offline
To do say <if><key[ right ]pressed?> <point in direction( 15)>
<if><< <not> >><< <and> >><key[ left ]pressed?><key[ right ]pressed?><point in direction( 0)
Offline
basically if <if right key pressed>
point in direction 15
<if not key left and key right pressed>
point in direction 0
<if key left pressed>
point in direction -15
Offline
it would actually be
forever
if not key right arrow pressed OR key left arrow pressed
point in direction 0
if key right arrow pressed point in direction 15
if key left arrow pressed point in direction -15
remember to use or not and and to put it in a forever block
Offline
Thanks for all the help, but there is one problem. When you hold down the key, it turns on an angle, and when you let go it retuns to upright position. But when you do hold down the key, the sprite sort of 'flickers' between the 2 positions. Any ideas...?
Offline