Top-Down Graphics

Get help using Construct 2

Post » Thu Dec 20, 2012 5:15 am

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.
B
4
Posts: 3
Reputation: 406

Post » Thu Dec 20, 2012 8:12 am

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
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Thu Dec 20, 2012 8:26 am

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!Drenrin2012-12-20 08:26:50
B
4
Posts: 3
Reputation: 406

Post » Thu Dec 20, 2012 2:29 pm

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.
B
90
S
32
G
14
Posts: 935
Reputation: 14,540


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, randomly, Yahoo [Bot] and 25 guests