invisible button is clickable - when using touch

Get help using Construct 2

Post » Fri Jan 25, 2013 1:32 pm

Hello,

I am trying to make my game more smartphone / tablet friendly via adding touch actions to buttons.   

I have a 3 level game, the button to advance to level 2 is placed on the stage and is set to invisible to start.   

I added an is touching object to advance to level 2.   

When I drag characters around the stage, when it goes over the the location of the button it advances to level 2.   I only want the button active when it is displayed.

Any advice greatly appreciated.    

Thanks

Tim
B
4
Posts: 16
Reputation: 857

Post » Fri Jan 25, 2013 2:43 pm

Add an additional event/condition-

Button...is visible.

B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Mon Feb 18, 2013 5:48 am

Bug or feature?
B
8
S
3
G
2
Posts: 49
Reputation: 1,938

Post » Mon Feb 18, 2013 5:54 am

Invisible objects can be triggerd - they are invisible on screen but visible for events.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Dec 08, 2015 6:10 am

Except with the mouse, the invisible objects are not triggered.
B
12
S
2
Posts: 135
Reputation: 1,036

Post » Tue Dec 08, 2015 11:59 pm

The touch triggers invisible events also @Phoenixbowman
B
7
Posts: 23
Reputation: 327

Post » Wed Dec 09, 2015 1:00 pm

Also,

tvenettozzi wrote:I added an is touching object to advance to level 2.


If you mean that you use "Is touching object" condition, it would be better to use "On tap object", so people don't accidentally go to the next level.
B
22
S
13
G
6
Posts: 147
Reputation: 5,451

Post » Thu Dec 10, 2015 10:12 am

As @chrisbrobs said. Just add the condition "is visible" to the on touch event and the button will not be clickable while invisible.

Exmaple: On touched object - object is visible > go to layout X
B
39
S
14
G
2
Posts: 554
Reputation: 5,225


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests