Clicking buttons over a touch anywhere rule
AngryBoi
Member Posts: 586
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
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
@lovejoy thanks again lol
You could also create another actor that fills the whole screen but is behind the buttons
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
@myu699 It would still click right through it.
@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.
@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
@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.
If it's a menu...
Do something like this.
dapion.de
[https://twitter.com/dapionde?]
@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
@tatiang @dapion @AJaymz Here is a picture of my menu if this could be a help
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
@tatiang Okay thanks. Will try