How do I create lighting effect

Get help using Construct 2

Post » Mon Mar 10, 2014 5:41 pm

How would I create a lighting effect where it is as if the whole world is dark, but the area where the "Light" is?

Kind of like a spooky game, only my player is inside a cave and its way too bright. I want it to be really dim in the cave, but have the torches I set out throughout the cave provide some light.

I made a example in Paint of what I want an effect to be:
Image

This is what it currently looks like in the game:
Image

As you can see I have the torch and every thing but it doesn't really look as if its helping the lighting, and the cave isn't dark because I don't know how to do that without changing the color of the cave itself, and that isn't what I want, I want to still have it there, but kind of have darkness over it.

If you could provide some detailed info on how, and maybe a .capx that would be great because I am not very good with construct 2 :c
B
8
S
1
Posts: 62
Reputation: 627

Post » Mon Mar 10, 2014 5:52 pm

B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Mon Mar 10, 2014 6:16 pm

I tried out your tutorial, and this is the effect I got:

http://oi59.tinypic.com/15fnouw.jpg

Which was not what I was looking for,
I was looking more for something where it actualy seems like its casting light, where its making the area brighter, using that tutorial, it is very easy to tell that its just some image on top of blackness.
B
8
S
1
Posts: 62
Reputation: 627

Post » Mon Mar 10, 2014 6:37 pm

Adding a black image with just a transparent circle where you want the light to be and putting that image in the top layer should work.
B
15
S
1
G
1
Posts: 15
Reputation: 1,051

Post » Mon Mar 10, 2014 6:47 pm

Check the blending modes example that comes with C2, there's one you can use to make the screen darker, and have circles that "poke holes" in the darkness
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Tue Mar 18, 2014 11:49 am

I tried that but what if the player places down a light source? Say he picks up a torch and sets it down on the wall somewhere, what then?
B
8
S
1
Posts: 62
Reputation: 627

Post » Tue Mar 18, 2014 12:24 pm

What's the problem ? If you attach the light to the torch, the light will stay on the wall.
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Thu Mar 20, 2014 6:02 pm

I am really confused, can anyone send me an example .capx?

Because what your describing is that there should be one layer of blackness, and where the torch is should be transparent on that layer, why would the whole layer follow the torch? And then what if you place other torches....


Sorry if i seem kinda stupid, new to construct and 2D Game dev really.
B
8
S
1
Posts: 62
Reputation: 627

Post » Thu Mar 20, 2014 6:03 pm

Can someone please provide an example .capx?

Where the player can:
-Walk
-Place torches
-Pickup torches
-There is darkness and the torches will make light.

Please, thanks :D
B
8
S
1
Posts: 62
Reputation: 627

Post » Thu Mar 20, 2014 9:16 pm

Open the "Example: Lightning"
Just make a layer, set the background to black, not transparent and "set own texture" to yes. Put a white circle with the "Destination Out" effect and voilà! To add more torches just create more white circles
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Colludium, Kin, worm1 and 30 guests