Check If sprite is not covered by shadow

Get help using Construct 2

Post » Tue May 05, 2015 4:04 pm

As construct has it's Shadowcaster object, is there any method to trigger event when object is overlapped by shadow?

Like :ugeek:

If Sprite Overlapped by Shadow (tag:""):
----Sprite add 1 to Value

I don't have any examples, as this question is so clear and I need so many games needing this in this very form.
~~~~Jabutosama
B
14
S
3
Posts: 68
Reputation: 1,439

Post » Tue May 05, 2015 6:10 pm

I don't think there's anything for this built in, but what you could do in events is to draw a line between the sprite and each light source of the specified tag. Then if the line touches a caster of the same tag, then the sprite is shaded from that light source. For all sources of the tag, if there is a line between sprite and source which is not blocked, the sprite is not in shadow.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 31 guests