Z-Order for RPG like movement

Discussion and feedback on Construct 2

Post » Mon Dec 24, 2012 7:44 am

Hey,
I'm having a little trouble with Z-index. I'm working on the "field" part of a game that is RPG. Think of how you move around in old-school Final Fantasy games and the like. Problem is that I need to have access to detailed Z-index functions such as moving an instance's Z-index one down or one up, or placing it in front/behind of a specific object. For example, when the player is in front of a sign, I need to move the sign behind the player and when the player is behind the sign, I need to move the sign in front of the player. These kinda games have many, many objects that the player will walk by in only one layout and this is why objects need to be moved when needed.

I am aware these options aren't available yet and were added to the to do list a long while back, but still haven't been added and I do believe that these are crucial features for a lot of games. Is there a work around for this? Or a plugin that I have missed? I have tried many things but nothing works how I want it to.

Thank you.VampyricalCurse2012-12-24 07:45:40
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Mon Dec 24, 2012 8:10 am

Hello:) Maybe this might help! :)



//Edit: Hehe, 3 at once:D JJList2012-12-24 08:14:32
B
17
S
5
G
1
Posts: 74
Reputation: 2,627

Post » Mon Dec 24, 2012 8:10 am

Take a look at this thread. newt's solution is simple and elegant.
B
27
S
9
G
5
Posts: 108
Reputation: 5,744

Post » Mon Dec 24, 2012 8:12 am

System expressions -> For each (ordered). For the expression do the Y position of sprite.

May want to put all the objects you want ordered in a family.

Action: move to top of layer.



edit: 3 posts at once, lol.alspal2012-12-24 08:13:45
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Tue Dec 25, 2012 10:55 am

Thanks everyone for the help. I found a plugin which seems to work perfectly so far. newt's excellent example does pretty much the same as the plugin. Thank you all.VampyricalCurse2012-12-25 10:56:25
B
47
S
10
G
6
Posts: 455
Reputation: 8,326


Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests