Dynamic light cone

Get help using Construct 2

Post » Wed Jan 18, 2017 9:39 am

Hi! I'm working on top-down shooter game, and want a visible light-of-sight. I'm using the appropriate behavior, but there are problems with its visible part. I want it to act like a light, not covering the solids, so sprites and masks aren't working. Line-of-sight shouldn't cast shadows, only light cone, which fits in corridor, for example. . Maybe I can use Shadow Light for it, but don't know how. Maybe there's a simple plugin, which creates a light beam - it would be great. Shadows don't stop at solids, I can't use them.
B
5
Posts: 13
Reputation: 251

Post » Wed Jan 18, 2017 2:48 pm

English is not my native language, sorry for mistakes
B
5
Posts: 13
Reputation: 251

Post » Wed Jan 18, 2017 3:36 pm

Take a look at this:

escape-is-possible-devlog_t183930

If that is close to what you're looking for then maybe you can ask @tallenwebdev for some advice to get you on track.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Wed Jan 18, 2017 4:22 pm

@Burvey
That's not what I want. Flashlight cone here is crossing over the obstacles, and it looks bad. It's exactly the problem I want to solve
B
5
Posts: 13
Reputation: 251

Post » Wed Jan 18, 2017 4:26 pm

It's actually very well done the way that he does it. If you look closely, the flashlight only shines the more dim light on objects that are shorter then the player. This is quite realistic. The light does not cross over or go through taller obstacles like the walls.

Watch the first half of this:
https://www.youtube.com/watch?v=MRaq6MzXuTM
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Wed Jan 18, 2017 4:49 pm

@Burvey
No, the light goes through the walls. It's hard to see that on 480p, but in the game it's really visible. The transparent shadows camouflage it a little, but not fuly.
B
5
Posts: 13
Reputation: 251

Post » Wed Jan 18, 2017 4:56 pm

Ah, ok. I've never played the game, just saw the videos.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Wed Jan 18, 2017 5:01 pm

Hi @Burvey and @Romalex, you're correct the light does go through the walls though it's been improved since the last update on the Scirra Arcade. I also want to find a fix that allows the 'light' to only extend to certain objects. Thanks though @Burvey for using my work as an example!
B
23
S
11
G
52
Posts: 137
Reputation: 27,881

Post » Wed Jan 18, 2017 5:31 pm

If you figure out a way please fill me in on it as well! Good luck!
B
23
S
11
G
52
Posts: 137
Reputation: 27,881

Post » Fri Jan 20, 2017 9:33 pm

Hey, does somebody know an answer? It would be amazing, because I don't see any solution but still need it so much
B
5
Posts: 13
Reputation: 251


Return to How do I....?

Who is online

Users browsing this forum: MrSkailo and 26 guests