How do I 'Disable a Layer'

Get help using Construct 2

Post » Sun Jun 21, 2015 12:20 pm

Hi, I've searched the forum for an answer to this, and I've seen the idea that you can disable the layers' actions if you put them in a group and enable / disable based on if the layer is visible and this works for a menu with sprites as buttons etc..

however in my example I'm using this code to drag out newly created sprites and put them on a new layer
Image

My goal is to be able to hide the spites that you drag (to drag out the newly created sprite) and not be able to click them when the layer is invisible.

Basically what would be perfect would be a way to disable drag and drop for all the sprites on (in this example) the 'BeachDraggables' layer - when that layer is hidden, and still be able to drag the sprites on the 'Dragged' layer

I've tried adding the sprites to a family and disabling the family drag and drop behaviour but then they all stop dragging (including the ones on the layer 'Dragged')

hopefully this makes sense and any help would be appreciated :)
B
16
S
4
Posts: 50
Reputation: 1,035

Post » Sun Jun 21, 2015 12:25 pm

Would adding a condition on drag and drop start if sprite is on layer "blabla" (layer is invisible) drop sprite work?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Jun 21, 2015 12:31 pm

Would adding a condition on drag and drop start if sprite is on layer "blabla" (layer is invisible) drop sprite work?


I tried this:

Image

For some reason this stops me dragging it out at all O_o
B
16
S
4
Posts: 50
Reputation: 1,035


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests