Press Once Actor

GendudeGendude Member Posts: 15
edited November -1 in Working with GS (Mac)
i'm working on a game that require the user to press on the squares to reveal what's underneath. Depending on what shows up you gain or lose a score. Them problem is you can keep clicking that button to gain or lose a score, I need it to be a one press actor. Please if anyone can help?

Thanks
Gendude

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi Gendude; use boolean attributes as "switches" will do the trick here. When a particular item under the square is pressed, as long as something like the following is in the Rules, it'll only score the once as you want.

    When All is true
    touch is pressed
    Attribute game.item1 is false

    your score stuff
    Change attribute game.item1 to true.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • GendudeGendude Member Posts: 15
    Thanks you very much, worked like a charm!

    Gendude
  • GendudeGendude Member Posts: 15
    Got one more problem I have 40 buttons on the screen and it's locking out the others. How do I get it to work for each button?

    Thanks
    Gendude
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Sorry to say you have to make 40 individual boolean attributes!! Can't think of a shortcut to that, I'm afraid.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • GendudeGendude Member Posts: 15
    No Problem - thanks
Sign In or Register to comment.