How do I disable object interaction on invisible layers?

Get help using Construct 2

Post » Wed Jan 06, 2016 12:14 am

Right now, I have the dialogue boxes for my game that pop up when an NPC is tapped. The dialogue boxes are set to a separate layer that I make visible once dialogue is initiates. Also, the GUI layer is set to invisible while the dialogue window is open. The issue I'm having is that, once the dialogue window is initiated, the invisible GUI layer, although invisible, is still able to be clicked on. How do I resolve this issue? It may just be a matter of figuring out how to disable object interactions on layer, but I can't seem to figure it out.
B
7
Posts: 16
Reputation: 307

Post » Wed Jan 06, 2016 12:31 am

Several ways to do this.
System:Layer is visible(X) by itself, or do the same giving an object's LayerNumber. ie System Layer is visible(Sprite.LayerNumber)

You can also group the input events in a Group and disable the group when the layer is not visible.
ImageImageImage
B
71
S
21
G
233
Posts: 3,696
Reputation: 130,368

Post » Wed Jan 06, 2016 1:22 am

This may sound like a total noob question, but how do you disable a group?
B
7
Posts: 16
Reputation: 307

Post » Wed Jan 06, 2016 2:01 am

System: Set group active
ImageImageImage
B
71
S
21
G
233
Posts: 3,696
Reputation: 130,368

Post » Wed Jan 06, 2016 11:03 am

WIth somthing like "state machine" you can set the group visibility depending on the state of your game.

if (state = 'GAME')
set group 'HELP SCREEN' Deactivated
B
18
S
4
G
1
Posts: 143
Reputation: 1,868


Return to How do I....?

Who is online

Users browsing this forum: dop2000, NN81 and 23 guests