GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

My character doesn't stay in position once game replays

justinodunnjustinodunn Posts: 226Member, PRO

The actor starts off at a specific location once the game starts, the actor goes up or down when the up or down buttons are pressed. The game ends when the actor collides with the wall, causing the actor to fall on the ground. When I press the up button, and keep pressing it until it hits the wall, it just floats all the way up? (same thing when i hold the down button, except floats down), and when I press retry, the actor doesn't stay at the starting location... it starts off there but moves to whatever direction that the button you were pressing was... Any ideas whats going wrong?

Comments

  • AlkaPPAlkaPP Posts: 194Member, PRO
    edited March 2014

    A little bit confusion of what you're asking, but did you mean the actor doesn't change direction when you click the up and down button? In this case, if you use boolean to control your actor then you might have forgot to switch it back. For example, you have 2 boolean attribute Up and Down.

    When button up is press, Up attribute = true, and when button down is press, Down attribute = true. If you did it, your actor won't change direction. You will need to switch it back to false once you release the button. Here is how:

    When button up is press, Up attribute = true, Otherwise: Up attribute = False.
    When button down is press, Down attribute = true, Otherwise: Up attribute = False.

    For the restart button, you will need to switch both Up and Down attribute to False when it is pressed or it will still true after you restart the game.

    Hope this helps.

    My Gamesalad Games On App Store:

    Greedy Chubby: https://itunes.apple.com/us/app/greedy-chubby/id834371213?ls=1

  • justinodunnjustinodunn Posts: 226Member, PRO
    edited March 2014

    Ahh yes silly me! Thank you very much! :)

Sign In or Register to comment.