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
5
G
8
Posts: 1,215
Reputation: 7,834

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
158
S
67
G
43
Posts: 2,603
Reputation: 36,003

Post » Tue Dec 08, 2015 6:10 am

Except with the mouse, the invisible objects are not triggered.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue Dec 08, 2015 11:59 pm

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

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
32
S
14
G
6
Posts: 161
Reputation: 5,831

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
58
S
25
G
14
Posts: 793
Reputation: 13,302


Return to How do I....?

Who is online

Users browsing this forum: Mhanz and 19 guests