Z-index of enemy instances...Need Help

Get help using Construct 2

Post » Sun Apr 14, 2013 8:15 pm

Hello all, I'm creating a sidescrolling brawler & I have run into a problem that I can't figure out. I'm hoping one of you may have the answer.
This is how I change z-index based on hero/enemy



Does anyone know how to do this with several enemy instances of the same type? If the enemies are randomly walking around how do I differentiate between them and have them change z-index based on those closest to the bottom of the screen without knowing beforehand how many enemies I may have on the screen at any one time?

Thank you for your time.
B
25
S
7
Posts: 79
Reputation: 2,267

Post » Sun Apr 14, 2013 9:31 pm

You can sort a Z order system using events, without any plugin, let me find the post and show you how.

by the way, it\s very easy to achieve using events.

http://www.scirra.com/FORUM/rpg-games-and-the-overlapping-issues_topic51274.html?KW=order

http://www.scirra.com/forum/plugin-isometric-z-ordering-based-on-y_topic46247.html
Image
B
108
S
24
G
18
Posts: 1,372
Reputation: 22,817

Post » Tue Apr 16, 2013 6:35 am

Thank you. This helped a lot.
B
25
S
7
Posts: 79
Reputation: 2,267


Return to How do I....?

Who is online

Users browsing this forum: Armench, Jackriduk, Kin and 23 guests