Dr Elmer Jiggle
King
- Joined
- Feb 25, 2003
- Messages
- 811
eotinb said:Are there other events that could fire at the same time a civ is eliminated besides losing a city? I think onCityLost() is fired every time onCityRazed() is, so there shouldn't be a need to check in both of those functions, but there may be some other way a civ is eliminated that I'm forgetting. Maybe if they lost their first settler before it founded the first city, although I can't see that ever happening. Something else?
A couple thoughts on this topic.
- If a civilization is not eliminated until their last settler is dead, it seems like you could catch that in the onUnitLost event handler. onCityLost and onUnitLost together ought to cover all the bases regardless of the rules.
- There is an onSetPlayerAlive event handler. I imagine that gets called when a civilization is eliminated. If so, that pretty much solves the problem without having to worry about checking for the last city, the last settler, etc.