Locking layers

This forum is currently in read-only mode.
  • How to lock specific layer via events?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How does that make sense? Locking layers is just so you can't select things on them in the IDE.

  • I think he's hoping for a way to lock a layer from input in runtime.

    While this can be done with variable checks or groups, it would be really nice and much simpler to have a lock feature that works in-game too... *wishful thinking*

  • I have 2 layers: Objects and Pause.

    While in a game Objects layer is active and Pause layer is inactive. When I pause the game Objects layer is inactive and Pause layer is active (but still both layers are visible).

    I have to do this because my game/app is about placing objects on Objects layer (by mouse-clicking) and pause menu is also controlled by mouse. If I don't lock Objects layer when I try to click button in pause menu I'm also placing an object in Objects layer.

    Davioware, I hope this makes sense to You

  • A simple switch will help here. Create a pv/global "pausing". Set it to 1 if the game is paused and back to zero if the game continues.

    Make a condition

    + global('pausing') equal to 0

    -> ... game stuff

    + else

    -> ... pause stuff

    and place all of the game related events as subevents of the first branch and all of the pause related events as subevents of the else-branch.

  • I thought about that solution. Pity that there's no layer locking action.


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