How do I Put player on foreground and objects on background

0 favourites
  • 15 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • 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??

  • Use layers

  • 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????

  • 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.

  • 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.

  • Give us .capx of your project.

  • 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.

  • 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?

  • 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.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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 fron top down makes the difference.

    Wow This worked ! Thankyou very much .. It worked.. so happy... i started the game yesterday watching a tutorial ... u r awesome

  • Glad it worked. The best thing you could do is to place all background sprites on the lowest layer. Like the background, the ground and trees etc. Then you can have a layer for only the player above that one. And if you want to have stuff in front of the player you can have a layer called "foreground" or something for all objects you want to be in front of the player. Then you can make it look like the player walks in tall grass or behind a wall or whatever.

    But just keep in mind the order of the objects and the layers and you'll get the hang of it. Good luck!

  • please make it to 204.2 version. Im using 204.2 version.

  • I can't downgrade but you should update to the latest stable release of C2.

    https://www.scirra.com/construct2/releases/r206

  • There are many demo tutorial in link below

    https://www.dropbox.com/sh/eioscti86bpr ... 7YPza?dl=0

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