Having a problem with touch buttons working together...
billpaterno
Member Posts: 26
I am working on a simple interface for moving my main actor. Mouse click left button, and main actor moves forward and to the left a bit. Mouse click right button, and main actor moves forward and to the right a bit. Click hold either button and actor rotates in place.
I created two game attributes. game.LeftMove and game.RightMove. They are boolean and set to false. I then created two buttons...each are separate actors but the same image (just rotated).One rule is left button receives mouse button down, change game.LeftMove to true. The other rule is left button receives mouse button up, change game.LeftMove to false.
The settings for my main actor to be controlled below:
http://i45.tinypic.com/2w3qbzd.png
Everything works fine when I first tested one button (the left side). However, when I added the right button, then the left button acted exactly as the right button. If I remove the right button, the left button works fine again. I know I am missing something here. What is it?
I created two game attributes. game.LeftMove and game.RightMove. They are boolean and set to false. I then created two buttons...each are separate actors but the same image (just rotated).One rule is left button receives mouse button down, change game.LeftMove to true. The other rule is left button receives mouse button up, change game.LeftMove to false.
The settings for my main actor to be controlled below:
http://i45.tinypic.com/2w3qbzd.png
Everything works fine when I first tested one button (the left side). However, when I added the right button, then the left button acted exactly as the right button. If I remove the right button, the left button works fine again. I know I am missing something here. What is it?
Comments
So:
When you press the left button,
set Left to TRUE
set Right to FALSE
and vice-versa for the right button...