T_KCommanderbly
Prince
Quick question, I want to be able to disable settlers for the AI. Using this code the AI seems to still be producing settlers... So what am I doing wrong?
Spoiler :
Code:
function NoAISettler(ownerID, cityID, unitTypeID)
local player = Players[ownerID]
local unit = GameInfo.Units[unitTypeID]
if not (player:IsHuman()) and (unitTypeID == GameInfo.Units["UNIT_SETTLER"].ID) then
return false
end
return true
end
GameEvents.CityCanTrain.Add(NoAISettler)