Locking layers

For questions about using Classic.

Post » Fri Apr 22, 2011 8:02 pm

How to lock specific layer via events?
B
53
S
14
G
10
Posts: 282
Reputation: 7,578

Post » Fri Apr 22, 2011 8:07 pm

How does that make sense? Locking layers is just so you can't select things on them in the IDE.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Sat Apr 23, 2011 10:00 am

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*
B
10
S
3
G
3
Posts: 110
Reputation: 2,206

Post » Sat Apr 23, 2011 10:07 am

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 :)
B
53
S
14
G
10
Posts: 282
Reputation: 7,578

Post » Sat Apr 23, 2011 10:59 am

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.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Apr 23, 2011 2:33 pm

I thought about that solution. Pity that there's no layer locking action.
Thanks.
B
53
S
14
G
10
Posts: 282
Reputation: 7,578


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest