I've created a custom map, all done and ready to share, but when i go to play it it always starts fully revealed, how do i put the fog of war back in?
Thanks
how do i put the fog of war back on a custom map?
Re: how do i put the fog of war back on a custom map?
Something like this:
Code: Select all
for k, force in pairs (game.forces) do force.clear_chart() end
Re: how do i put the fog of war back on a custom map?
Thanks Klonan, i found out how, heh, cheers
i went with
/c local surface = game.player.surface
local force = game.player.force
for chunk in surface.get_chunks() do
force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)
end
yours sounds much cleaner
hope i used the right one
i went with
/c local surface = game.player.surface
local force = game.player.force
for chunk in surface.get_chunks() do
force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)
end
yours sounds much cleaner
hope i used the right one