How do I Put player on foreground and objects on background

Get help using Construct 2

Post » Thu Jun 04, 2015 1:16 pm

As you see , my player is behind tree when he walks on platform , how to make tree go behind and player come front of the objects??
Image
B
4
Posts: 27
Reputation: 254

Post » Thu Jun 04, 2015 1:41 pm

Use layers

Image
I'm a Magician, not a Developer.
B
21
S
8
G
25
Posts: 105
Reputation: 14,252

Post » Thu Jun 04, 2015 1:51 pm

Im new to construct 2 , Kindly give me clear answer. I have 4 layers...
Ok i placed player on layer on higher level (2) and objects on low layer(1) ,

then the objects are not appearing on screen????
Last edited by kiranchandra on Thu Jun 04, 2015 1:54 pm, edited 1 time in total.
B
4
Posts: 27
Reputation: 254

Post » Thu Jun 04, 2015 1:54 pm

@kiranchandra Are both layers visible?

You should put the background, ground and the trees on layer 0 and the player sprite on layer 1. Then make sure both layers are visible and it should be right.
Last edited by Anonnymitet on Thu Jun 04, 2015 2:23 pm, edited 1 time in total.
B
52
S
22
G
12
Posts: 725
Reputation: 11,716

Post » Thu Jun 04, 2015 2:03 pm

I Did exactly as u said , but when i put player into layer 1 , objects become invisible.. i checked under initial properties and it shows both layers as visible.
B
4
Posts: 27
Reputation: 254

Post » Thu Jun 04, 2015 2:13 pm

Give us .capx of your project.
I'm a Magician, not a Developer.
B
21
S
8
G
25
Posts: 105
Reputation: 14,252

Post » Thu Jun 04, 2015 2:24 pm

HERE IS THE CAPX FILE

mediafire.com/?usebld3yqi74ztv

someone please fix and make all objects come back and player come front , also tell me what u did.
B
4
Posts: 27
Reputation: 254

Post » Thu Jun 04, 2015 2:26 pm

And are both squares checked besides the layer name and the lock pad like the image shows that XpMonster posted?

Or do you have any events that hides layer 1 or something?
B
52
S
22
G
12
Posts: 725
Reputation: 11,716

Post » Thu Jun 04, 2015 2:29 pm

Your player object is behind the already existing tree objects on your layer 0.
On start of layout, use the action "Move to top" from the layer category for your player object.

Always remember that when you create a new object or instance, it is placed on top of all the already existing instances of the same layer it is on.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Thu Jun 04, 2015 2:30 pm

You still have the player on the lowest layer. Right click on sprite and move it to the layer named "layer 0" in your case. Then right click on the player again and set z order "move to top". Done

I can't upload the capX again because I have a higher C2 version than you. But do as described above and you'll be fine. Just remember that if you want something to be in front of something else the sprite you want in front always have to be on a layer above the other objects layer. The name of the layers doesn't matter. The order of the layer from top down makes the difference.

Here is the the fixed capX if you have version 206. I changed the names of the layers and put the sprites on the correct layers.
https://dl.dropboxusercontent.com/u/100 ... ggame.capx
Last edited by Anonnymitet on Thu Jun 04, 2015 2:39 pm, edited 2 times in total.
B
52
S
22
G
12
Posts: 725
Reputation: 11,716

Next

Return to How do I....?

Who is online

Users browsing this forum: InfiniteRockets, ksiads, Zav and 6 guests