Clicking buttons over a touch anywhere rule

Okay so I have a menu where you can touch anywhere on the screen to start playing. How would I make it so when I touch the buttons the touch anywhere to start playing rule doesn't apply? Is there a way?

Comments

  • LovejoyLovejoy Member Posts: 2,078

    @MoneyBags said:
    Okay so I have a menu where you can touch anywhere on the screen to start playing. How would I make it so when I touch the buttons the touch anywhere to start playing rule doesn't apply? Is there a way?

    You can add a condition to the touch anywhere rule so it only fires once, for example

    when all apply

    when touch is press
    when game.start is false

    change attribute game.start to true
    and whatever else you have here that makes the game start

    Fortuna Infortuna Forti Una

  • AngryBoiAngryBoi Member Posts: 586

    @lovejoy thanks again lol

  • myu699myu699 Member Posts: 96

    You could also create another actor that fills the whole screen but is behind the buttons

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    One method is to use an actor that changes the scene When Touch is Pressed and just copy and resize the actor a bunch of times to fill the spaces around the other button actors. It's not elegant but it does work.

    So far, though, you haven't explained whether or not you've tried the suggestions and if so what happened or why you couldn't implement them.

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

  • AngryBoiAngryBoi Member Posts: 586

    @myu699 It would still click right through it.

  • AJaymzAJaymz Member, PRO Posts: 164

    @MoneyBags Let's say you have buttons at the top of the screen. Make an invisible actor and stretch it on the whole screen except for over the buttons area up top. In that actor make a rule that when touch is pressed then start playing. But if you have your buttons spread out around the screen, then that probably wouldn't be the best option.

  • AngryBoiAngryBoi Member Posts: 586

    @Ajaymz @tatiang @myu699 @lovejoy Thanks all for the suggestions.. but I have just decided to change it to 'tap and hold to play.' Nothing seemed to work

  • AJaymzAJaymz Member, PRO Posts: 164

    @MoneyBags Where are your buttons located? I've used my method multiple times flawlessly. Some people will probably think press and hold will be annoying. Just a thought.

  • dapiondapion Member, PRO Posts: 353

    If it's a menu...
    Do something like this.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @dapion Exactly. Similar to what I described but nice to see it visually.

    @MoneyBags For future reference "nothing seemed to work" is not a helpful statement if you're looking for further troubleshooting advice. You've still not told us anything beyond your initial question.

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

  • AngryBoiAngryBoi Member Posts: 586

    @tatiang @dapion @AJaymz Here is a picture of my menu if this could be a help

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    There are ways to fiddle with booleans to get what you want to work but if it was me, I would just place a bunch of rectangular actors and be done. It looks like it could probably be done using about 6-7 actors.

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

  • AngryBoiAngryBoi Member Posts: 586

    @tatiang Okay thanks. Will try

Sign In or Register to comment.