setReveal function

platyping

Sleeping Dragon
Joined
Oct 22, 2010
Messages
4,626
Location
Emerald Dreams
Hi guys, does anyone know the usage of this function:

Code:
VOID setRevealed (TeamType eTeam, BOOL bNewValue, BOOL bTerrainOnly, TeamType eFromTeam)

I was thinking that using this under def onBeginPlayerTurn may let me reveal the black fog at others' capital, but it doesn't seems to do anything

Spoiler :
Code:
		pPlayer = gc.getPlayer(iPlayer)
		iTeam = pPlayer.getTeam()
		
		for iPlayer2 in range(gc.getMAX_CIV_PLAYERS()):
			pPlayer2 = gc.getPlayer(iPlayer2)
			iTeam2 = pPlayer2.getTeam()
			pcapital = pPlayer2.getCapital()
			iX = pcapital.getX()
			iY = pcapital.getY()
			pPlot = CyMap().plot(iX,iY)
			pPlot.setRevealed(iTeam, true, true, iTeam2)
 
That function is a bit confusing, but try using NO_TEAM in the 'eFromTeam' spot and see if that helps.

Edit: Nevermind, that would only affect things if you don't have it set to TerrainOnly. Not sure why your code isn't working.

2nd Edit: Try using 'True' instead of 'true'.
 
thanks, i figured out it should be getCapitalCity() instead, slight mistake there.

true or True both works, but NO_TEAM solves alot future problems for me ^^

After some trial and error, it seems that setting the first bvalue to false will cover the plot back into black fog as expected.

However, if the plot is under your own culture, or adjacent tile, you will not be able to reveal it again.

But if it isn't, moving a unit there again will reveal it. Abit unexpected though
 
Back
Top Bottom