Ulixes
Prince
- Joined
- May 2, 2010
- Messages
- 312
Hi Everybody.
I hope some of you can help me, or at least give me an hint on how to do this.
I would like to find a way (in Lua) to make the buildings auto sold or deleted (which way is easier) when obsolete.
Why?
I'm creating buildings for Ancient, Classical and Medieval Era and I want to make them obsolete at a certain tech.
Problem: the player can still fill the specialist slots of an obsolete building.
So, I thought that the solution could be to auto-sell or delete the entire building once obsolete (of course, if someone of you as a better idea, feel free to suggest it).
I don't know if this has ever bothered someone else but I finally found the time to return to modding some day ago and I really would like to fix this problem.
Is there an event fired when a building become obsolete?
Since I never saw a code who deletes a building, is there anyone that has an idea on how to do it?

I hope some of you can help me, or at least give me an hint on how to do this.
I would like to find a way (in Lua) to make the buildings auto sold or deleted (which way is easier) when obsolete.
Why?
I'm creating buildings for Ancient, Classical and Medieval Era and I want to make them obsolete at a certain tech.
Problem: the player can still fill the specialist slots of an obsolete building.

So, I thought that the solution could be to auto-sell or delete the entire building once obsolete (of course, if someone of you as a better idea, feel free to suggest it).
I don't know if this has ever bothered someone else but I finally found the time to return to modding some day ago and I really would like to fix this problem.
Is there an event fired when a building become obsolete?
Since I never saw a code who deletes a building, is there anyone that has an idea on how to do it?
