CarlCoral55
Chieftain
- Joined
- May 19, 2018
- Messages
- 3
I am creating a mod where if a unit is within 2 tiles of a city with an armory, they get a certain promotion. I've hooked my promotion assigning function to the game events via
Where ArmoryCompleted successfully takes care of assigning the promotion correctly. However, if the armory was bought, my functions aren't fired. Is there any way to hook my lua code onto the game so that whenever a city makes a purchase, my code is called? For example something like:
I have all the DLC's and I have included whoward's various DLL components mod, so if there are any hooks inside these that would help please let me know, thanks!
Code:
GameEvents.CityConstructed.Add(ArmoryCompleted)
Where ArmoryCompleted successfully takes care of assigning the promotion correctly. However, if the armory was bought, my functions aren't fired. Is there any way to hook my lua code onto the game so that whenever a city makes a purchase, my code is called? For example something like:
GameEvents.CityMadePurchase.Add(ArmoryPurchased)
I have all the DLC's and I have included whoward's various DLL components mod, so if there are any hooks inside these that would help please let me know, thanks!
Last edited: