Help with on screen controls!!
cbowers428
Member Posts: 176
BACKGROUND:
I have an actor who can move left and right. I have a left and right button on the screen. I also have a game text attribute that changes to "left" "right" or "none". When touch is pressed or inside the left arrow, the text attribute is changed to "left" of course, and the same goes for the right arrow. When released it is changed to "none" and the actor stops moving.
HERES THE ISSUE:
If somebody is holding the right arrow, then simultaneously presses and releases the left one (but is still pressing the right one) the actor stops moving. I think I know why. When touching the right arrow the text is changed to "right". Then when the left is pressed the text is changed to "left". But when the left is released the text changes to "none".
HERES THE QUESTION:
How can I fix this?
I have an actor who can move left and right. I have a left and right button on the screen. I also have a game text attribute that changes to "left" "right" or "none". When touch is pressed or inside the left arrow, the text attribute is changed to "left" of course, and the same goes for the right arrow. When released it is changed to "none" and the actor stops moving.
HERES THE ISSUE:
If somebody is holding the right arrow, then simultaneously presses and releases the left one (but is still pressing the right one) the actor stops moving. I think I know why. When touching the right arrow the text is changed to "right". Then when the left is pressed the text is changed to "left". But when the left is released the text changes to "none".
HERES THE QUESTION:
How can I fix this?
Comments
http://www.resqwest.com/TEST/left_right.gameproj.zip
Here's my issue.
Note: I am using two hands/fingers to play.
If I am touching AND HOLDING the right button (changing game.CONTROLS to "right" thus moving my actor right), and then touch the left button with my other finger while still holding down the right button (changing game.CONTROLS from "right" to "left") my actor goes left. HOWEVER, if I lift my finger off of the left button but I am STILL holding the right button, my game.CONTROLS attribute is changed from "left" to "none" instead of "left" to "right".
I want the attribute to read "right" due to the fact that the touch is inside of the right icon.
That might help.
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io