Problems with buttons to move character, left and right

scrapee_netscrapee_net Member Posts: 424
edited November -1 in Working with GS (Mac)
Hello.
I put two buttons on my game, One on the left side of the screen, and the other one on the right.

This is the problem:
If I press for example, the left button, the actor will move to the left, and so, if I press the right button without releasing the left one, it will move to the right, and then if I release the right button, the actor wont move to the left again. But the left button is still pressed, So I'd like that the actor move to the left again...

I`m using the rule, if touch is inside, or if touch is pressed.
---

To play well the user needs to release a button before pressing the other one.

How can I solve this?

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    Did you watch the GameSaladCookBook video on Left/Right Platformer?

    http://www.youtube.com/user/GameSaladCookbook#p/u/34/RKiJE1pa4Dc

    This throws in two additional rules that check for pressing on the left/right button when the right/left button is already pressed respectably.
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    dun use touch is pressed. cos it will take any touch input as the triggle, regardless which button.
  • scrapee_netscrapee_net Member Posts: 424
    I did exactly what he sad in the video, but it still dont work as I need.

    Simplifying, I just need a way, that I can move the finger from one button to the other, without releasing the screen.
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Watch this series starting with this one, what you need starts toward the end of the video and continues on with other videos, so you need to watch those as well. It may be what you are looking to do.

  • GLGAMESGLGAMES SingaporeMember Posts: 988
    You have to have a 0 sec timer to check whether left right button is pressed everytime since you dun wish to lift up ur finger.
Sign In or Register to comment.