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
20
S
6
G
7
Posts: 1,215
Reputation: 7,342

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
147
S
58
G
38
Posts: 2,557
Reputation: 32,526

Post » Tue Dec 08, 2015 6:10 am

Except with the mouse, the invisible objects are not triggered.
B
15
S
4
Posts: 192
Reputation: 1,475

Post » Tue Dec 08, 2015 11:59 pm

The touch triggers invisible events also @Phoenixbowman
B
8
S
1
Posts: 27
Reputation: 460


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
43
S
16
G
6
Posts: 628
Reputation: 7,687


Return to How do I....?

Who is online

Users browsing this forum: oddreal and 1 guest