Lua Checking if a city has a building.

turingmachine

Emperor
Joined
May 4, 2008
Messages
1,438
How do I check if a city has a specific building?

I see:

GetNumActiveBuilding
GetNumBuilding
GetNumBuildings
GetNumFreeBuilding
GetNumRealBuilding

I'm not really sure what the difference is.

Do I do something like:

local CASTLE = GameInfoTypes.BUILDING_CASTLE

if pCity:getNumBuilding(CASTLE, 1) == true then
 
Try this:

Code:
if (pCity:GetNumBuilding(CASTLE ) > 0) then
 
Back
Top Bottom