Pressing Two Buttons At Once

Hi All,

I have an issue with buttons. I have 4 buttons in a quiz, and the quiz progression/new questions etc are controlled with pressing the incorrect or correct answer.

This works corrects when pressing only 1 correct/incorrect answer, and I progress through the quiz correctly.

However if my finger slips, or are too fat, I can press 2 answers at once.

So my question is, how can I stop 2 buttons being pressed at once?

Many thanks,

Rob

Answers

  • mrpacogpmrpacogp Member Posts: 400
    Using touch 2 maybe.
    Its like when you want to use two fingers zoom
  • kanuvaskanuvas Member Posts: 21
    Can you explain. I have a feeling you may have mis-understood me. I have 4 buttons, but I only want to be able to press one at once
  • mrpacogpmrpacogp Member Posts: 400
    Apologize about that, i have confused the question.
    What rule are you using for detect while press button?
    Mouse button down and inside?
  • kanuvaskanuvas Member Posts: 21
    When TOUCH is PRESSED
  • mrpacogpmrpacogp Member Posts: 400
    Test then, when touch is pressed and inside.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @mrpacogp That rule will be true if you are pressing two or more buttons at the same time. I think you can do it with

    When [all] Touch is Pressed AND Mouse Position is Inside

    Another way is to check the touches.count attribute and make sure it's 1.

    I actually have set up a rather convoluted way, which is to concatenate the name of the button to a text string (with Otherwise text string ="") and check to see if the button name matches the text string.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Add the touch count to each of your button's touch is pressed rules. So rule when touch is pressed and game.touchcount < 2

    This will two one of two things, first if one is pressed first it will let that one work, two if both are pressed nothing will happen.
  • MlabAppsMlabApps Member, PRO Posts: 79
    Use the "When Touch is Pressed/Released" condition in your rule. Also check your layers. ;)
Sign In or Register to comment.