0 Favourites

Top-Down Graphics

  • Hello, just started messing around with Construct 2 a few days ago and I'm loving it so far, but I'll get with it.

    I'm having trouble with some top-down graphics. Similar to an ARPG, I want the effect of walking behind an object, where the player sprite fades behind it, while also being able to stand in front of it, where the player sprite does not. Now, I know I can emulate this by cutting said objects in half and placing them on separate layers. I'm just wondering if there is an easier way to achieve this that I missed somewhere.

    I've searched all around tutorials and the help section and I couldn't find anything, so if the answer is out there, sorry about that.<img src="smileys/smiley5.gif" border="0" align="middle" />

  • Well an alternative theory you could use would be to use.

    On Overlap between player and object

    if player.Y < object.Y -> object Z order to front

    ELSE

    object Z orer to back

    however. I would be concerned with sending the object WAY to the back where you can't see it. So be warned

    Another would be to do

    On Overlap of Player and Object

    IF player.y < object

    -> object to layer overlap

    ELSE

    object to layer tiles

    then have the player sit on a layer between overlap and tiles... something like that

  • It worked. Had to do it without the "on overlap" condition though. I'm gonna have to experiment with this to see if there's a more efficient way to do it. It'd be nice if this were a behavior, or if you could event your own behaviors. Regardless, thank you!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Juantar made a plugin to take care of this, and rexrainbow updated it to make it more stable and add some neat features. You can find a link to rexrainbow's updated version here. It works like a charm, just set in the events for it to order everything on whatever layer you need. I have it do it something like every 0.1 seconds, because its not really necessary to do it every tick. Just remember, like every non-official plugin, it means you won't be able to upload to Scirra's arcade with it.

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