How do I delete all objects on a specific layer

0 favourites
  • 2 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hello everyone,

    I have a problem with my level selection.

    I have a game with 3 levels, separated in 3 layouts.

    And each level has 3 difficulties.

    I built the difficulties on different layers in the layouts. (EasyLayer, MediumLayer, HardLayer)

    What I want to do now when starting a Layout:

    • Check which difficulty was selected.
    • Set the chosen "DifficultyLayer" visible.
    • Delete all objects on the other layers, because the colliders affect the player, even if the layer is set to invisible.

    Thanks for a new perspective... @

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Probably not the best way to do it, honestly. You'd be better off creating the additional objects (at the start of the layout) based on the difficulty, that way you can have everything on one layer.

    The only solution I can think of to the way you did it would be to use "Pick All" on every instance of that object, test if it is on a certain layer number/name, and then destroy it if it is.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)