Discussion in 'Civ5 - SDK / LUA' started by Tomatekh, Dec 5, 2012.
Is there a way to run a function after a specific building is built?
Most things like this require a start-of-turn event, because even the ones that DO have an Event for triggering often have... issues. Like how the Improvement Created event only triggers if the active player (you) SEES the improvement being created. But there's not even anything close to that for building completion.
Thalassicus has made one Lua events for that in CivUP IIRC.
Shame, and after Civ IV had such a convenient self.onBuildingBuilt in its python (which was really nice for new python based wonders).
Thanks for the help.
I just checked, have a look at MT_LuaEvents.lua in CiVUP.
Thanks a lot. I'll see if I can make it work.
I have something similar working in Epochs in the ISEventHandler/ISEvents files if Gedemon's solution doesn't work.
Not the cleanest code but it's getting there.
Nice. I'm glad to see the community adding the events that Firaxis should have given us TWO YEARS AGO. But obviously they were busy adding a few more DLC civilizations. (No, I'm not bitter.)
Separate names with a comma.