kts.GetHomeFor

Name

kts.GetHomeFor – get the "home location" (dungeon entry point) of a player

Synopsis

result = kts.GetHomeFor(player)

result = kts.GetHomeFor(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 function returns the current "home" (entry point) for that player, if they have one, or nil otherwise.

Return Value

The return value is either nil, or a table with fields x, y, facing, tile and (possibly) secured_by. See kts.GetAllHomes for a description of what these fields mean.

Errors

If the input is not a valid Player, nor a Creature representing a knight, then an error is raised.

See Also

kts.GetAllHomes

kts.GetTiles

kts.Secure

kts.SetHomeFor

kts.Tile