Delete all object instances in a specific layer ?

Get help using Construct 2

Post » Tue Nov 27, 2012 5:57 pm

Hi there !

I would like to delete all instances of an object but only on a specific layer.

If I have created 10 instances (random number) of an object on layer 2 at the moment it becomes visible, I would like to delete these when the layer became invisible.

Any idea ? I could save all Ids and delete objects one by one but if there is a easiest idea, I will take it :)

Thanks !!
B
40
S
9
G
5
Posts: 127
Reputation: 6,609

Post » Wed Nov 28, 2012 9:12 am

I found how, it was easy...

For information :

For each "object"
&& "object".layerName (or .layerNumber) = "theLayer" --> "object".destroy()

Sorry for bothering ;)
B
40
S
9
G
5
Posts: 127
Reputation: 6,609


Return to How do I....?

Who is online

Users browsing this forum: Draconinho, LeFuji, plinkie, totoe and 20 guests