Hi all, here is my LUA code in order to increase great engineer spawn rate (for Greece as an example). But it's now working. Does anyone has any idea why? Thanks.
function EngineerBoost(iPlayer)
local player = Players[iPlayer];
if GameInfo.Leaders[player:GetLeaderType()].Type == "LEADER_ALEXANDER" then
for pCity in player:Cities() do
pCity:SetGreatPeopleUnitProgress(6,100); -- 6 is index of great engineer
end
end
end
GameEvents.PlayerDoTurn.Add( EngineerBoost );
function EngineerBoost(iPlayer)
local player = Players[iPlayer];
if GameInfo.Leaders[player:GetLeaderType()].Type == "LEADER_ALEXANDER" then
for pCity in player:Cities() do
pCity:SetGreatPeopleUnitProgress(6,100); -- 6 is index of great engineer
end
end
end
GameEvents.PlayerDoTurn.Add( EngineerBoost );