Change Direction in Touch
der_chinty
Member Posts: 5
Hi all,
i can't find any solution to change direction on touch.
So when Game Starts do nothing (thats fine :-) )
But when touch ist pressed, the player should accelerate to the left and on another touch to the right and so on.
Every touch change direction in X
My Rule is
-Actor Receive Event - Touch is pressed
- Do Change Attribute - Linear Line Velo = 100
Otherwise
-Actor Receive Event - Touch is pressed
- Do Change Attribute - Linear Velo = -100
That doesn't work for me...
Could you Please help me?
Thanks very much
Comments
Look up how to make a boolean toggle switch. Use that to toggle an integer attribute between 0 and 1.
Then in the actor, define rules for the actor to move one way when your attribute is 0 and the other way when the attribute is 1.
Voila!
Would that work with 3 or 4 attributes @pHghost? For example up, down, left, and right.