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
21
S
6
G
8
Posts: 1,215
Reputation: 7,876

Post » Mon Feb 18, 2013 5:48 am

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

Post » Mon Feb 18, 2013 5:54 am

Invisible objects can be triggerd - they are invisible on screen but visible for events.
ImageImageImageImage
B
155
S
61
G
41
Posts: 2,577
Reputation: 34,314

Post » Tue Dec 08, 2015 6:10 am

Except with the mouse, the invisible objects are not triggered.
B
18
S
5
G
1
Posts: 229
Reputation: 2,240

Post » Tue Dec 08, 2015 11:59 pm

The touch triggers invisible events also @Phoenixbowman
B
8
S
2
Posts: 27
Reputation: 610


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
46
S
19
G
10
Posts: 658
Reputation: 10,126


Return to How do I....?

Who is online

Users browsing this forum: Lanhoj and 8 guests