increase great engineer spawn rate?

starter

Chieftain
Joined
Dec 22, 2011
Messages
14
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 );
 
You have an InGameUIAddin entry for the Lua file?

Post the complete mod, it's far easier to work with than snippets of code.
 
Thank you for your help. Actually It has been pointed out by someone else that City:Set(Get\Change)GreatPeopleUnitProgress is not used in dll, so these are invalid functions....
 
Back
Top Bottom