FieryCharizard7
Chieftain
Hello all,
I am working on a Wonder that was said to have "given birth to the Renaissance" so I was planning on this wonder giving the player the Acoustics tech upon completion if not already discovered. I am unsure where to implement this function as it only needs to run once, so Running it on every players turn would be redundant.
I figured I'd have the code along the lines of
Other than where to add the function, is this correct?
I am working on a Wonder that was said to have "given birth to the Renaissance" so I was planning on this wonder giving the player the Acoustics tech upon completion if not already discovered. I am unsure where to implement this function as it only needs to run once, so Running it on every players turn would be redundant.
I figured I'd have the code along the lines of
Code:
function CampanileTech(iPlayer)
if (Teams[pPlayer:GetTeam()]:IsHasTech(GameInfoTypes.TECH_ACOUSTICS,) == false) then
Teams[pPlayer:GetTeam()]:SetHasTech(GameInfoTypes.TECH_ACOUSTICS, true)
end
end
GameEvents.--Production Complete--.Add(CampanileTech)
Other than where to add the function, is this correct?