OnlyHeStandsHere
Chieftain
- Joined
- May 4, 2018
- Messages
- 46
Does anyone have any experience with the "Events.ImprovementAddedToMap()" or "Events.ImprovementChanged()" Lua hooks? The game keeps hard-crashing when I try to use them, and I don't know if it's because too many improvements are being checked or if I did something else weird. Is there a separate hook I should be using? Or some other way I should initialize it other than waiting for the loading screen to close?
Here's my code:
Here's my code:
Code:
function SwissPastureCreated(iPlotX, iPlotY, iImprovement, iPlayer, iResource, iPillaged, iWorked)
print("Improvement has Changed")
end
function InitializeSwissPastureCreated()
Events.ImprovementAddedToMap(SwissPastureCreated)
end
Events.LoadScreenClose.Add(InitializeSwissPastureCreated)