Odd Discovery about onEndPlayerTurn

Kael

Deity
Joined
May 6, 2002
Messages
17,403
Location
Paris, France
From what Im working on it looks like onEndPlayerTurn gets called right after onBeginPlayerTurn but before the player performs his actions.

I assumed that onEndPlayerTurn was run well... at the end of the turn. Has anyone else noticed this. Where are you putting your events that you want to kick at the end of the players turn?

BTW: I came across this because I was adding promotions to units at the begining of that players turn and cleaning them up at the end of the players turns (simulating the fact that the unit was a good attacker but not defender). But the promotion never showed up. By taking the removal off of onEndPlayerTurn the promotion started showing up. It was getting added and removed by onEndPlayerTurn before the player got to take his actions.
 
Hmmm, weird. I guess that's why they put the Civics thing there in the default event manager.

I suppose it must be so you can sneak things in before the workings go through, and also do stuff that depends on the workings.

You can probably bodge a proper event by just doing it on the start of the next player's turn. I'm assuming players play in order from 0 to 18 right?

Looks like onBeginGameTurn, and onEndGameTurn are similar. - onBeginGameTurn is 'Called at the beginning of the end of each turn'
 
Back
Top Bottom