Destroy Character if not in Shadow

Get help using Construct 2

Post » Mon Jan 14, 2013 5:44 pm

Hi there, I'm working in a new game but it's a kind of special game, a game where you are a shadow and you need to be in the shadows to not die, ofcourse it will be a puzzle platform game.

I'll let the images explain themself:



So I'm using the Canvas plugin to draw lines that draw shadows, the question is - How can I specify a state while the player is between the shadow lines and how to specify another for when the player isn't between they. -

Capx: Main Capx

Event Sheet ScreenShot:


- Thanks for helping :DdevMidgard2013-01-14 19:00:38
B
17
S
4
G
4
Posts: 104
Reputation: 3,950

Post » Mon Jan 14, 2013 5:56 pm

use a sprite that's is is always center on the player and the light source.

width = distance(player, light)
height = 20

if the sprite "is overlapping; invert" shadow casting objects. Then kill player.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Mon Jan 14, 2013 7:00 pm

[QUOTE=jayderyu] use a sprite that's is is always center on the player and the light source.

width = distance(player, light)
height = 20

if the sprite "is overlapping; invert" shadow casting objects. Then kill player.[/QUOTE]

I didn't get what are you trying to explain.

PD: Added a screenshot of the event sheet.
B
17
S
4
G
4
Posts: 104
Reputation: 3,950


Return to How do I....?

Who is online

Users browsing this forum: Pandadoor, Zebbi and 14 guests