Sid Meier's Civilization V

Sid Meier's Civilization V

Unit Created Event [snippet for mod makers]
5 条留言
Machiavelli  [作者] 2015 年 4 月 4 日 下午 9:27 
Sadly GetGameTurnCreated() is insufficient to ensure that the event only fires once per unit. A unit that was created and embarked in the same turn (ei purchased landshnek) would generate SerialEventUnitCreated twice. The serial event also fires if a human reloads the game. Also, upgrading a unit is implemented as deleting and spawning another unit, which would have a misleading creation turn.
qqqbbb 2015 年 4 月 1 日 下午 7:37 
Instead of addong promotion to every unit you can use GetGameTurnCreated().
Machiavelli  [作者] 2014 年 5 月 29 日 上午 7:18 
I am the same machiavelli on CivFanatics (technically I'm "Machiavelli24" on CivFanatics). I haven't posted this code on there yet. I want to get my religion snippets on the workshop first.
lshipp 2014 年 5 月 29 日 上午 6:36 
NIce. I've subscribed to both of your these. Wondered if you had posted them to Civfanatics. I'm assuming you're the same Machiavelli as over there.
DJSHenninger 2014 年 5 月 29 日 上午 2:06 
These mods sound really awesome for people like I who absolutely know nothing about lua! Thanks :D Hope you make more of these!