Events, onBeginPlayerTurn, onEndPlayerTurn and the order of a turn?

krille

CivDOS Fanatic
Joined
Sep 5, 2005
Messages
337
Hello!

I can't seem to find any good info on this. What is the game and player turn order?

Example: In a turn, what happens before onBeginPlayerTurn, between onBeginPlayerTurn and onEndPlayerTurn and after onEndPlayerTurn? How does one find out into which event one's code should go? I find this mighty confusing.

Where do a city's "HurryAngerTimer" get decremented, population grow, production finish, hurried defender pop out, etc. Where do all of these things go? What is the order of a turn and where do the events cut in?
 
Game turns and player turns are different. OnBeginGameTurn will run at the start of a new turn, after everyone has gotten past their last turn. OnBeginPlayerTurn will run when that individual player reaches the new turn.

The difference is that PlayerTurn (if it involves an AI) can trigger after you've ended your own turn, but GameTurn will only trigger at the start of your turn.

This is a lot harder to explain in words than it is to see in the game. :crazyeye:
 
You should take a look at this excelent tutorial post 3 . This depend on the game type you play .

Tcho !
 
Well, I do get what you are saying. :)

But, then what's the order of "things" WITHIN a turn?

Before the player gets to move a single unit, there seem to be no less than two events being triggered: onBeginPlayerTurn and onEndPlayerTurn. Moreover, lots of other game stuff happens (units pop out, buildings get built, cities grow, etc, etc) before the player gets to move. In what order do things happen?

1) What happens before onBeginPlayerTurn?
2) What happens in between onBeginPlayerTurn and onEndPlayerTurn?
3) What happens after onEndPlayerTurn?

Hope I made myself clear this time.
 
Gaius Octavus has made a good sumary . And i don't think i can explain better than Gerikes do . Sorry !

Tcho !
 
Gaius Octavus has made a good sumary . And i don't think i can explain better than Gerikes do . Sorry !

Tcho !
I missed your first post earlier, sorry for that. Guess I was typing when you posted. I shall have to take a look at Gerikes' "Section 2: Civilization 4 Multiplayer Concepts:" post. Thanks.
 
Back
Top Bottom