possible to have sprite halfway in front of and in back of a

Get help using Construct 2

Post » Fri Mar 07, 2014 10:39 am

project includes windows and doors.
Is it possible to have a sprite half-way inside the window and halfway outside of it?
I can only get either my sprites to be behind the background or in front of it.
The effect I'm looking for is to have a sprite (person) sticking their head out a window.
B
7
S
2
Posts: 158
Reputation: 1,021

Post » Fri Mar 07, 2014 10:42 am

I didnt test it, but maybe this will help you:
https://www.scirra.com/manual/146/effects
But therefore you window needs to be "transparent".
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Mar 07, 2014 10:53 am

That's not logically possible.
Put your sprite behind the window and make new sprite (only the head) in front of the window,
ImageImageImageImage
B
158
S
66
G
43
Posts: 2,603
Reputation: 35,868

Post » Fri Mar 07, 2014 11:02 am

What you need is to layer the sprites and maybe look into using blend modes, I'd assume this would be what you're after https://dl.dropboxusercontent.com/u/108 ... indow.capx

If not, can you post a CAPX ?
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Fri Mar 07, 2014 11:08 am

@emoaeden: yes. That's what I'm looking for. Thank you
and thanks for the other replies

However, what is determining why the sprite goes in front of only that particular tile?
I see you have blend mode on the sprite but how does it determine when to go in fron tof and in back of the tiles?

Edit: Never mind. I see you changed the xorder of the tiles..
Nice..thanks you
B
7
S
2
Posts: 158
Reputation: 1,021

Post » Fri Mar 07, 2014 11:18 am

The Z order is what determines that.

Go to the View tab, check the Z Order box and you will see the Z Order Window pop up. I could have controlled this through code, through Sprite Z Order functions, but I'm sure you can have fun doing so ^_^
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Fri Mar 07, 2014 11:28 am

Thank you
B
7
S
2
Posts: 158
Reputation: 1,021


Return to How do I....?

Who is online

Users browsing this forum: vendara and 3 guests