kts.SetRotate

Name

kts.SetRotate – set up rotated versions of tiles

Synopsis

kts.SetRotate(tile1, tile2)

kts.SetRotate(tile1, tile2, tile3, tile4)

Description

This function tells the dungeon generator that the two or four tiles given are rotated versions of each other.

The dungeon generator will sometimes randomly create reflected and/or rotated versions of map segments for added variety. In doing so, it may be necessary to create rotated versions of certain tiles (for example, a skull facing in one of four possible directions). This is set up by the kts.SetRotate function.

The two versions of the function call correspond to two possible cases:

  1. Tiles like doors need two versions: one "horizontal" and one "vertical".
  2. More general tiles (like the skull tiles) need four versions: one for each of the four possible "facing directions" (north, east, south, west). In this case the four tiles should be listed in clockwise order in the kts.SetRotate call.

Return Value

None.

Errors

Errors may be raised if the input parameters have the wrong type.

Examples

Several of the standard Knights tiles contain reflected and rotated versions. See tiles.lua.

See Also

kts.LoadSegments

kts.SetReflect