Hiya,
I'm trying to use a lua script to disable wonders (lua so it'll work better with wonders added by mods) but I cannot get it to work - all wonders are still buildable.
It's just a slightly changed version of something whoward69 wrote:
Am I missing the point here? Will hooking it onto this event not work for what is selectable to the player (ie. only works for the AI)?
Thanks in advance.
I'm trying to use a lua script to disable wonders (lua so it'll work better with wonders added by mods) but I cannot get it to work - all wonders are still buildable.
It's just a slightly changed version of something whoward69 wrote:
Code:
function CityCanConstructWonder(iPlayer, iCity, iBuilding)
if (GameInfo.BuildingClasses[GameInfo.Buildings[iBuilding].BuildingClass].MaxGlobalInstances == 1) then
return false
end
end
GameEvents.CityCanConstruct.Add(CityCanConstructWonder)
Am I missing the point here? Will hooking it onto this event not work for what is selectable to the player (ie. only works for the AI)?
Thanks in advance.