Turn Generator


Author: Dan
Version: 2 (2001-Apr-04)
Version: 1 (1999-Jun-09)

The TakeTurns data type can be used to run turn based games. Just add a few players and define actions to take place for the various events. For a very simple demo, check out Dan.TakeTurnsDemo .


Public Functions:

AddPlayer(mob/M)
Call to add a new player to the game.

DelPlayer(mob/M)
Call to remove a player from the game.

NextTurn()
Call to move to the next player's turn.

Halt()
Call to pause the current turn.

Resume()
Call to resume from the previously halted turn.

Restart()
Call to restart the turn generator from the first player's turn.

Overridable Functions:

BeginRound()
Called before the first player's turn in each round.
Default action: none.

BeginTurn()
Called at the beginning of the current player's turn.
Default action: inform the players.

EndTurn()
Called at the end the current player's turn, before the next player gets to go.
Default action: none.

ExpireTurn()
Called when time has run out for the current player's turn.
Default action: inform the players.

WarnExpireTurn()
Called when time is 3/4 out for the current player's turn.
Default action: warn the player.