go to next layer

Discussion and feedback on Construct 2

Post » Mon Feb 01, 2016 11:50 pm

i can't find an event that makes me go to next layer not layout on pressing an object , any help ?
B
15
S
8
G
2
Posts: 57
Reputation: 2,480

Post » Tue Feb 02, 2016 2:17 am

semaso wrote:i can't find an event that makes me go to next layer not layout on pressing an object , any help ?


First, make sure the layers are added,

then in an on object clicked event, add an event from the Z-ORDER section at the very bottom called "Move to layer"
B
5
S
1
Posts: 68
Reputation: 515

Post » Tue Feb 02, 2016 3:11 pm

You should be able to move an object up and down between layers by using the action @Itenimum1 mentioned, but instead of naming the exact layer, use an expression: Sprite.LayerNumber+1
B
121
S
31
G
17
Posts: 1,468
Reputation: 19,930

Post » Tue Feb 02, 2016 11:39 pm

@Itenimum1 @glerikud : guys i don't know if you understood me right or not , i don't want to move the object itself , what i want to do is simply " an arrow sprite and when clicking on it it switch me to the next layer or the layer i choose , while the arrow remains in its place " . thanks for replaying
B
15
S
8
G
2
Posts: 57
Reputation: 2,480

Post » Wed Feb 03, 2016 9:32 am

All layers are in a way combined together in a layout. Layers themselves are just the Z order, depth. So changing layer on an object just changes it's depth, nothing else.
B
5
Posts: 23
Reputation: 273

Post » Wed Feb 03, 2016 12:18 pm

You can set different layers invisible by default, and store the currently visible layer's number manually in a variable. Then by pressing the button you get the next layer's number, setting that layer to visible and updating your variable. The button for triggering all this should be at the top layer with parallax settings (0,0).
B
121
S
31
G
17
Posts: 1,468
Reputation: 19,930

Post » Wed Feb 03, 2016 5:19 pm

@semaso , what you are saying doesn't make much sense by it self.

What this "switch me to the next layer" should look like? What will it do, visually and functionally?? Have you changed the scale and/or parallax values of the layers? Or you just want a sprite to come in front/behind other sprites by your command (change the z-order of the sprite by pressing a button)?

What @glerikud already told you however, is how you pick and, potentially, change something between layers.
composer - multimedia artist
www.eli0s.com/en/
B
63
S
26
G
4
Posts: 1,145
Reputation: 9,517

Post » Wed Feb 03, 2016 10:13 pm

thanks guys @eli0s @glerikud @its just steve
B
15
S
8
G
2
Posts: 57
Reputation: 2,480

Post » Thu Feb 04, 2016 3:44 am

So you want to hide layers? Or a set of objects on a layer?
B
5
S
1
Posts: 68
Reputation: 515

Post » Sun Feb 07, 2016 6:26 pm

@Itenimum1 non of them i just want to make a level system so when i press on a sprite like an arrow in a current layer it takes me to another layer " by order or by name " that is it , i only could find event that makes system takes me to another layout " by order and by name ". thanks in advance :)
B
15
S
8
G
2
Posts: 57
Reputation: 2,480

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests