How do I make so when I click button, no others are trigged?

Get help using Construct 2

Post » Mon Feb 02, 2015 5:44 am

Hey everyone, I am having a problem. Every time I press the next level buttons in my game, it triggers the shoot button below it (it being the the layer) as well. So, I'm wondering, how do I make it so that the shoot button only gets triggered when it actually gets tapped (and not when the button on layers above are tapped)?

My Code (Is there some condition I should add? What I've done isn't doing the trick lol):
Image
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Mon Feb 02, 2015 6:28 am

Add another condition

Touch > Is touching >Next Level Button (x) the (x) being inverted

Then it won't conflict with what ever statement your using for Touch Next Level Button .

Just a suggestion and I could be wrong but it looks like you could make the "System trigger once" a sub event and place some of the events into it.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Mon Feb 02, 2015 7:13 am

Thanks a lot @TheDom, it seems like it may have worked. I'll post again if it doesn't do the trick.
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Mon Feb 02, 2015 8:37 am

Just another suggestion. Presumably you have a variable to indicate a game is in progress or not; just check for that variable. Otherwise you might find if you add another button, that will also get in the way, and you'll have to add another condition for that, etc. PS is there a reason why do you do 'is touching' with 'trigger once' instead of just 'on touched'?
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: ramyaswetha and 5 guests