Beat 'em up z order question

Get help using Construct 2

Post » Sat Feb 15, 2014 5:57 pm

So in my game Psi, I'm trying to create a force field effect. The problem is getting the enemies on the far side to be behind it instead of in front of it in the z order. Here's what it looks like:



Anyone have any ideas how to get the zombies to the right of the force field to be behind it without throwing off the overall z order?
Image
B
20
S
4
Posts: 382
Reputation: 2,964

Post » Sat Feb 15, 2014 6:10 pm


Why didn't you use family on these enemies and do action as move behind the force field with event like on collision or compare distance by instance variable.
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,361

Post » Sat Feb 15, 2014 7:01 pm

What do you mean by compare distance with instance variable?
Image
B
20
S
4
Posts: 382
Reputation: 2,964

Post » Sat Feb 15, 2014 9:46 pm

@Joannesalfa
Image
B
20
S
4
Posts: 382
Reputation: 2,964

Post » Sat Feb 15, 2014 9:52 pm

Each enemies should check distances between enemy and player to compare more like it's alternate collision if you modified collision polygon.


By the way, I'm working another beat 'em up game for mobiles, if you would like to share our experiences, PM me.
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,361

Post » Sat Feb 15, 2014 9:56 pm

Thank you, sounds good! Are you having wacky issues with z ordering your game? I find there to be a lot of conflicting variables...
Image
B
20
S
4
Posts: 382
Reputation: 2,964

Post » Sat Feb 15, 2014 10:01 pm

Not really, so tell me what's your current method about variables for z order.

Z order to each enemies was very easy to implement in correct way, it worked perfect on my game.
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,361

Post » Sat Feb 15, 2014 11:23 pm

Here is the basic event:



The trick is that I'm using regular sprites for the collision boxes and spriter objects for the actual animations. One problem I'm having, for instance, is keeping the range attack of Psi in the right z order. The actual collision box for the attack is generated from the box around her shadow so it's at a lower level than her visible blast attack.
Image
B
20
S
4
Posts: 382
Reputation: 2,964

Post » Sat Feb 15, 2014 11:30 pm

Use extra layers in your layout? Put elements you want to be always on top regardless, on the top layer.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Mon Feb 17, 2014 4:10 pm

That wouldn't work because I want the characters on the front side to be in front of it and all of the characters still need to keep the relative z order. I still haven't solved this problem. Seems like a tricky one to me. :(
Image
B
20
S
4
Posts: 382
Reputation: 2,964

Next

Return to How do I....?

Who is online

Users browsing this forum: SturmIV and 4 guests