Fog of War

Get help using Construct 2

Post » Sun Mar 24, 2013 10:57 pm

I would like to figure out fog of war for a turn-based game involving a square grid. Different characters will see more or less of the map.

I've been thinking of having invisible squares that are always a certain distance from the character. Also, are black squares on each tile that use color overlay so they make what's below them black and white. When the invisible squares overlap a black square, the black square has its opacity set to 0.

Firstly, is this a good strategy?

Second, if so, how do I get the black squares to go back to opacity 100? I've tried the else command and inverting the condition, but neither has worked.
B
10
S
4
G
3
Posts: 103
Reputation: 2,984

Post » Mon Mar 25, 2013 3:25 am

Any ideas?
B
10
S
4
G
3
Posts: 103
Reputation: 2,984

Post » Mon Mar 25, 2013 3:29 am

You might want to take a look in C2 at the Examples, there is one in there that does a flashlight effect "Lighting", maybe that can help give you ideas.

Brett
B
21
S
7
G
1
Posts: 128
Reputation: 3,076

Post » Mon Mar 25, 2013 4:43 am

That strategy sounds like it would work fine. For setting opacity back to 100% just put a "every tick set opacity to 100" event above the events that set opacity to 0.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Tue Mar 26, 2013 4:07 am

Thanks guys, that helps a lot!
B
10
S
4
G
3
Posts: 103
Reputation: 2,984


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, Radulepy and 6 guests