How do I disable all objects within my unused layer

Get help using Construct 2

Post » Mon Oct 30, 2017 1:11 pm

Hello :)

In Construct 2 it is necessary to have at least one instance of an object type in any layer in order to create another instance by an event.
Since nearly each object in my project is created by script, I use a specific layer called "Unused" which is invisible and contains exactly one instance of each object which should be spawned by script.

Now the problem is that my invisible enemies within the "Unused" layer are attacking the player.

Does anybody know a best practice to handle that problem? Should I delete all objects within the "Unused" layer on start? Is there a more elegant solution for this like "deactivate" layer or something?

Thank you guys!
B
9
S
2
Posts: 10
Reputation: 497

Post » Mon Oct 30, 2017 1:20 pm

@25games

Put all objects in an unused Layout instead of a Layer, then you don't need to hide or delete them, but can still spawn them by script.
Find all the Construct 2 games that were on Steam Greenlight here
B
38
S
10
G
7
Posts: 501
Reputation: 7,129

Post » Mon Oct 30, 2017 2:11 pm

Oh, that's it! I was just confused by the diffrent terms "Layout" and "Layer"
Thank you very much :)
B
9
S
2
Posts: 10
Reputation: 497


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 16 guests