Move when touch the button
Martin14
Member Posts: 109
how can i make a good move when i touch a button ??
i make a a rule when tuch is press .. change atribete (left) to 1.
when touch is release change atribute (left) to 0.
rule
when atribute left is = 1
accelerate.
my problem is that when i touch two buttons at the samie time my actor go anywere... :S
sory for my English !
i make a a rule when tuch is press .. change atribete (left) to 1.
when touch is release change atribute (left) to 0.
rule
when atribute left is = 1
accelerate.
my problem is that when i touch two buttons at the samie time my actor go anywere... :S
sory for my English !
Comments
2 game integer attribute
-left
-right
---------------------
Left button:
When Touch is pressed
change attribute: game. left to 1
OTHERWISE
change attribute: game.left to 0
-------------------------------
Right button:
When touch is pressed
change attribute: game.right to 1
OTHERWISE
change attribute: game.right to 0
------------------------------
MOVING ACTOR RULES:
RULE 1: When attibute game.left is 1
MOVE: Direction 180
OTHERWISE
change attribute: game.left to 0
RULE 2: When attribute game.right is 1
MOVE: Direction 0
OTHERWISE
change attribute: game.right to 0
I do that but I have up down left rigth... if i press up and rigth at the same time my actor start moving alone... :S
Basically you would have to go in each button and do something like this:
LEFT BUTTON:
When (any) attribute
-game.up=1
-game.down=1
----Rule: when touch is pressed
change attribute game.left to 0
ETC....
See what I mean? Try to play around with it.