How do I make fog of war

Get help using Construct 2

Post » Wed Mar 26, 2014 4:54 pm

I need to create a fog of war effect that ties to the player character's line of sight so that the the player can only see what the player could see. This is for a top down view game.

I tried to use the Line of Sight behavior on the player character and have that correspond to a tilemap on a layer above the player character, but couldn't figure out a way to get the Line of Sight behavior to interact with only individual tiles that it could "see."
B
11
S
2
G
1
Posts: 79
Reputation: 842

Post » Thu Mar 27, 2014 3:02 am

Well, I'm not very happy with this one, and it certainly isn't efficient. But maybe it will give you some ideas.
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Thu Mar 27, 2014 5:01 am

shirokuma wrote:Well, I'm not very happy with this one, and it certainly isn't efficient. But maybe it will give you some ideas.


Thank you. I was hoping to not have to do all the individual sprites for the fog of war, but I think I might have to go that route. I was expecting a few more events, so thank you for the capx!
B
11
S
2
G
1
Posts: 79
Reputation: 842

Post » Sat Mar 29, 2014 2:09 am

Bump.

So shirokuma's solution is having a layer of tiny sprites that were manually placed and become transparent when in the player's line of sight.

How do I set it up so that the game places all the sprites automatically at the start of the layout?
B
11
S
2
G
1
Posts: 79
Reputation: 842

Post » Sat Mar 29, 2014 12:14 pm

It can be set up something like this:
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Sat Mar 29, 2014 5:48 pm

shirokuma wrote:It can be set up something like this:


Thank you very much!

EDIT: Completely unrelated, but how do I link my Construct 2 license to my forum login? I've had Construct 2 for about 9 months now on Steam, but I just signed up for the forums a few days ago.
B
11
S
2
G
1
Posts: 79
Reputation: 842

Post » Sat Mar 29, 2014 6:00 pm

You can request your badge by forwarding your proof of Steam purchase to [email protected] along with your forum account name.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Sat Mar 29, 2014 8:56 pm

Thank you!
B
11
S
2
G
1
Posts: 79
Reputation: 842

Post » Sat Mar 29, 2014 9:00 pm

Here's a quick edit that doesn't require local variables:
You do not have the required permissions to view the files attached to this post.
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests