Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
And you can use city:IsCapital() to find out whether a City is the Capital City of a Player.
But if your goal is to only add a building to the capital anyway, then the function of choice is usually player:GetCapitalCity()
So overall that part of the script would look something like this:
if(currentCargo == GameInfo.Cargo["CARGO_DYSON"].ID) then
local activePlayer = Game.GetActivePlayer()
local capital = player:GetCapitalCity()
if player == activePlayer then
if capital ~= nil then
capital:SetNumRealBuilding(GameInfo.Buildings["BUILDING_AIZENVAULT"].ID, 1)
end
else
<Do stuff for AIs>
end
end
There's probably a few syntax errors in the script and I can't actually test whether it works properly right now, but it should be a good place to start from.
http://forums.civfanatics.com/showthread.php?t=399821
If that's not the problem, then please rephrase what you meant.