Why when I make a layer invisible it is still responding

Get help using Construct 2

Post » Sat Feb 07, 2015 1:30 pm

Hi Guys,

Does anyone know why when I hide a layer I still can click on them even though they are hidden?

Many thanks in advance.
B
5
S
1
Posts: 35
Reputation: 447

Post » Sat Feb 07, 2015 2:14 pm

Hey zardaloop, :)

As far as I know, if you have events responding to user interaction in the hidden layer, the event's will continue to run normally whether the layer is invisible or not.

To disable interaction with that layer, you could track down the relevant events relating to that layer, and alter them, so they include a "Layer is visible" condition.
That way when the layer is invisible, none of the events relevant to that layer will run.

If there are a lot of events specific to that layer, for instance if it's a show/hide-able menu, you can put all the layer's events inside a group, and toggle the entire event group on and off when you show or hide the layer.
B
26
S
17
G
8
Posts: 323
Reputation: 6,021

Post » Sat Feb 07, 2015 2:50 pm

Hi @ fisholit I have done what you suggested and it did the trick. Many thanks :)
B
5
S
1
Posts: 35
Reputation: 447

Post » Sun Feb 08, 2015 11:05 am

No problem, glad to hear it worked out. :)
B
26
S
17
G
8
Posts: 323
Reputation: 6,021


Return to How do I....?

Who is online

Users browsing this forum: Bro7hers, mekonbekon and 7 guests