Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Fog of War on map

Hi. I want to create a fog of war on my maps just as any strategy game like AOE, Warcraft or Starcraft. It's just a black zone that hides a portion of the map wich you cannot see beacuse you hasn't get there yet. The logic would be that phew specified portions of the fog of war clear themselves as the player enter them. I tried using black pictures of different shapes. But that seems useless since pictures don't scroll with the map as the player moves.
Any ideas? I'd really appreciate. Any scripted solution will also be well received since I'm beginning to learn the language. Thanks a lot.
 
You have to use variables for that. Let me see...

Okay, first make an event and set two variables. The first one make it set to Player's Screen X and the other one to Player's Screen Y. Then after that, call the Picture call command and set the picture to the two variables you set before. After that, make an "Erase Event" command so that the picture disappears when you leave the current map.

Set it to Parallel Process and test away.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top