Swipe to Move an Actor Help
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, so if I am moving down I can swipe again and change directions before ever reaching the boundaries of the bottom screen. 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 slides across the floor (as if on ice) until it hits a wall and stops. Now that it has stopped, I can choose a new direction to send it sliding in, rather than being able to change directions mid-slide 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:
Comments
By finished executing, I mean the actor (in this case, a box sliding on ice) slides across the screen until it collides with a wall or another box, thus stopping it. Now that it has stopped moving, the player may once again choose a direction to slide the box in. The point is to create puzzles that require a specific path the player must slide the box in, in order to reach a goal.
With the current controls, I can bypass this puzzle path by spam-sliding the mouse to slide straight to the goal, without ever having to stop moving or collide with a wall or other obstacle. This is obviously game breaking. I hope this explanation makes more sense, and thanks again for any help!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
any way to do this ? my actor keeps sliding till I tap again to stop it.