Showing player in the front,and back of an enemy?

Get help using Construct 2

Post » Mon Jun 01, 2015 4:41 am

Trying to make a beat em up game, how do I show the player when it is in front of the enemy,
How do I cover the player when it is behind an enemy?

Or show an example of multiple enemies at once some behind the player, some in the back, I really need
help with this. :?:
B
15
S
3
Posts: 45
Reputation: 1,040

Post » Mon Jun 01, 2015 6:57 am

To put something in front or back or just to trick a sense of depth in 2D you would use Layers.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
71
S
19
G
8
Posts: 640
Reputation: 9,701

Post » Mon Jun 01, 2015 7:30 am

Or you could play around with the Z-Depth if they were on the same layer.

I.e. When player in front of enemy -> Send player sprite to front of layer
When player behind enemy -> Send enemy sprite to front of layer
B
9
S
3
G
1
Posts: 53
Reputation: 1,296

Post » Mon Jun 01, 2015 2:45 pm

galacticfan wrote:Or you could play around with the Z-Depth if they were on the same layer.

I.e. When player in front of enemy -> Send player sprite to front of layer
When player behind enemy -> Send enemy sprite to front of layer


I tried doing something like that but it didn't seem to read correctly.
EXAMPLE:
Every tick_Player.Y>Enemy.Y_Move to bottom layer,
Every tick_Player.Y<Enemy.Y_Move to top layer.

What am I doing wrong?
B
15
S
3
Posts: 45
Reputation: 1,040

Post » Mon Jun 01, 2015 3:06 pm

Try to use "System - Compare two values", CurioJoe.

Image

Should work perfectly.
I'm a Magician, not a Developer.
B
22
S
8
G
25
Posts: 106
Reputation: 14,294

Post » Mon Jun 01, 2015 7:24 pm

XpMonster wrote:Try to use "System - Compare two values", CurioJoe.

Image

Should work perfectly.


Thanks, I figured it out.
B
15
S
3
Posts: 45
Reputation: 1,040


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests