Need help with dodge controls
![Pennez-Games](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
ok so im making a dodge type game, with touch screen controlls,
so iv got two controlls, left and right,
ok so heres the problem, when i click the right controll the actor moves right, but if i want to click right again, the actor wont move right, you have to click the left control before being able to use the right control again howcome? i dont know why, its realy confusing, help would be very appreciated! thanks
so iv got two controlls, left and right,
ok so heres the problem, when i click the right controll the actor moves right, but if i want to click right again, the actor wont move right, you have to click the left control before being able to use the right control again howcome? i dont know why, its realy confusing, help would be very appreciated! thanks
Comments
I think if you post or show us a screenshot of your rules that trigger the controls, we may be able to help!
Sydney Swans 2014!!
that gameAttribute trigger the actor's rule for movement
tapping that button again does nothing
because the gameAttribute has already been changed
and the movingActor's rule has already run
==
you need to reset that gameAttribute:
in the button's rule add changeAttribute Behavior in the Otherwise: section
EX: for boolean gameAttribute
Rule: when
Event: touch is pressed
-changeAttribute: game.Right To: true
Otherwise:
-changeAttribute: game.Right To: false
but for a moving actor that has 3 states … standstill; right; left
only one gameAttribute … index type … name: Direction … is needed
0 = standstill
1 = move right
2 = move left
then on your rightButton actor
Rule: when
Event: touch is pressed
-changeAttribute: game.Direction To: 1
Otherwise:
-changeAttribute: game.Direction To: 0
and on your movingActor:
Rule: when
Attribute: game.Direction = 1
-do this
Otherwise:
Rule: when
Attribute: game.Direction = 2
-do that
add Rule: when
Event: overlaps or collides with your walls
-changeAttribute: game.Direction To: 0
thanks so much!! you totally fixed my problem! thanks!!
sorry