Swipe to Move an Actor Question
mfieldgames
Member Posts: 2
I followed the tutorial on how to set up swipe controls to move an actor Left, Right, Up, Down and got it to work, but there is something more that I want set up that I don't know how to do. The current set up allows me to freely change directions every time I swipe in a new direction. For the game I am making, I want to hinder that free-movement by only allowing the player to move in a new direction after the actor has finished moving in the first direction chosen, by colliding with a wall or object. For instance, I slide to move a box down and it moves until it hits a wall and stops. Now that it has stopped, I can choose a new direction to send it in, rather than being able to change directions mid-move like it is set up now. Any help in setting up this control system will be greatly appreciated!
For reference, here is that tutorial:
For reference, here is that tutorial:
Answers
create game attribute name stop real.
put rule for movement : when move change att stop to 1
make another rule when collide with wall (or whatever you want to stop)
change att stop to 0
then put this if att stop = 0 for your movements. I am not good teacher sorry