kts.TeleportTo – teleport a creature to a given location
kts.TeleportTo(creature, pos)
The first parameter should be a Creature and the second parameter should be a position (that is, a table containing fields x
and y
giving the co-ordinates of a particular square in the dungeon). The creature will be moved to the given square. If the square is occupied, then the four adjacent squares (to the north, south, east and west) will also be tried. If all of those are occupied as well, then the creature is left at its current position.
None.
Errors will be reported if the parameters are not a Creature and a map position respectively.
This function just moves the creature, it does not play any sound effect or flash the screen etc.; that has to be done separately.
kts.TeleportTo(cxt.actor, {x=33, y=31})