1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[LUA] Best way to execute some Lua when a particular Wonder is built?

Discussion in 'Civ5 - Creation & Customization' started by Drawmeus, Nov 4, 2012.

  1. Drawmeus

    Drawmeus Emperor

    Jul 25, 2007
    I'm implementing a building that needs to execute a particular bit of Lua when first constructed. I'm reasonably familiar with but not an expert on Lua and scripting in general.

    Is there a generally accepted best way to do this?

    I did find this: http://forums.civfanatics.com/showpost.php?p=9899570&postcount=3 - I could get it working by using the code lemmy101 put together, I think, but that feels like an extraordinarily heavyweight implementation for what ought to be pretty basic functionality.

    Any responses appreciated.

    UPDATE: I got it working using lemmy101's code from the link above; I had to do some debugging and it still doesn't handle save/reloads smoothly, but I'll be able to fix that. If there's a less arduous way of doing it, I would still love to hear it, though.

Share This Page