make an actor move a specific distance
geoffy
Member Posts: 13
Might be pretty easy to do but I can't figure it out. I want to make an actor move only a certain distance when touched. basically want to make an actor jump from one place to the next, but only allow the actor to jump a certain distance. Appreciate some help with this, and sorry if it's been asked and answered before. Cheers
Comments
Basically when the actors facing right change walk right to true. In the actor have when touch is pressed and walk right is true change attribute self position x to self position x+1
then when hes facing left change attribute walk left to true. Have a rule when touch is pressed and walk left is true change self position x to self position x -1.
Make sure that when one is true, you change the other one to false
have a attribute called move
in the actor have a rule when touch is pressed change attribute move to 1
then in that same when touch is pressed rule drag in a timer have it after 0.1 seconds with run to completion checked then put a change attribute behavior in the timer and change move to 0.
Then make another rule when attribute move =1
then drag in a move behavior. leave the direction to 0, next to direction where it says relative to make sure its relative to actor. And you can leave the speed at 300