kts.EliminatePlayer

Name

kts.EliminatePlayer – eliminate a player from the game

Synopsis

kts.EliminatePlayer(player)

kts.EliminatePlayer(knight)

Description

This function takes one parameter, which can either be a Player object (e.g. as returned from kts.GetPlayer), or a Creature object representing a knight. Either way, the corresponding player is eliminated from the game. Their knight (if currently alive) will be instantly killed, they will not respawn, they will take no further part in the game, and the message "PlayerName has been eliminated" will appear for all players.

If all players but one are eliminated (or if all remaining players are on the same team, in team games), then the game ends and the remaining player (or team) is declared the winner.

Return Value

No value is returned.

Errors

If the argument is not a player or knight, then an error is raised.

Notes

If a player dies and cannot respawn (because all of their entry points have been secured) then they are automatically eliminated from the game – there is no need for the Lua to explicitly call kts.EliminatePlayer in this case.

See Also

kts.GetAllPlayers

kts.GetPlayer

kts.IsEliminated