Problem with buttons

AbrigaitoAbrigaito Member Posts: 44
edited November -1 in Working with GS (Mac)
I need help with this, I really don't know what I'm doing wrong. So there is the actor in the center then a right and left button. When I press the right button the actor moves but it doesn't stop and then the button can't be pressed again, same for the left button.

I want to press the button so the actor move one step then stop then do it again and again.

Here is the template:

http://gamesalad.com/game/play/89024

Comments

  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Did you use Move behavior? Maybe try Move To or Interpolate, instead.

    Hope that helps.
  • AbrigaitoAbrigaito Member Posts: 44
    Well I want the buttons to work like CodeMonkey's template

    http://gamesalad.com/game/play/85953

    I followed that template, but it doesn't work the same and it doesn't matter if I use accelerate, move or move to it always do the same thing.
  • AbrigaitoAbrigaito Member Posts: 44
    It seems my template is not working I'll put the rules:

    Created two boolean game attributes Left and Right

    Player.....

    Attribute - game.right is true

    Move right
    Speed 50

    Attribute - game.left is true

    Move left
    Speed 50

    Right button.....

    actor receives event touch is pressed

    change attribute game.right to... true

    Left button......

    actor receives event touch is pressed

    change attribute game.left to... true
  • expired_012expired_012 Member Posts: 1,802
    Simple solution:

    In your right and left buttons, put an otherwise statement in each

    Right: Otherwise, change attribute game.right to false

    Left: Otherwise, change attribute game.left to false
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    artonskyblue said:
    Simple solution:

    In your right and left buttons, put an otherwise statement in each

    Right: Otherwise, change attribute game.right to false

    Left: Otherwise, change attribute game.left to false

    Yep!

    Whenever you use a template as a guide or to copy and paste from be sure to ALWAYS check the otherwise sections. They really ought to make a little icon that appears when the otherwise is used because it is so easy to forget to look there!
  • AbrigaitoAbrigaito Member Posts: 44
    Thank you =D I didn't check the "Otherwise" option I knew it was something simple, but I just couldn't find the error.
Sign In or Register to comment.