[Help] Unrevealing a tile

__jack__

Warlord
Joined
Dec 29, 2009
Messages
141
Hi,

Civ has "3 levels of map visibility":
1: Visible
0: Revealed (fog of war)

Those two are easy to switch to using RevealAllTiles() or VisibilityCount to 0 or 1
I m interested in the 3rd level: before we reveal the tile when it is covered by the map parchement.

I have seen Reveal.HIDDEN in the code using GetState(x,y) but how can I set a tile back to that map parchement state?

Best,
 
I figured it out using UI:
local pLocalPlayerVis = PlayerVisibilityManager.GetPlayerVisibility(Game.GetLocalPlayer());
if (pLocalPlayerVis ~= nil) then
local iCount = Map.GetPlotCount();
for plotIndex = 0, iCount-1, 1 do
local visibilityType = pLocalPlayerVis:GetState(plotIndex);
if (visibilityType == RevealedState.REVEALED) then
print(plotIndex);
UI.AddTemporaryPlotVisibility("Natural Disaster", plotIndex, RevealedState.HIDDEN);
end
end
end
 
Back
Top Bottom