This is an old revision of the document!
A tile is the primary building block of a map in RPG in a Box. Tiles are typically used to construct the ground, buildings, and other structures/architecture, and can be independently placed at any XYZ coordinate within the map. A tile's coordinate is unique among other tiles in the same map, as only one tile is permitted per XYZ coordinate. As the player character and NPCs move around the map, any tiles they step onto will act as terrain and determine the vertical positioning of the characters.
Refer to the table below for a list of tile properties that can be accessed from a script. If the property can be assigned a new value using an assignment statement, it will be noted in the description.
|<tile>.id||Entity ID of the tile, as set in the Map Editor from the Entity Properties panel. This can be used to either retrieve or change the ID of the tile.|
|<tile>.coord||Coordinate of the tile.|
|<tile>.direction||Cardinal direction (NORTH, SOUTH, WEST, EAST) in which the tile is rotated. The default direction of an entity is SOUTH.|
|<tile>.characters||An array of characters currently occupying the tile, or null if there are none.|
|<tile>.groups||An array of groups to which the tile is assigned. The array will be empty if the tile is not assigned to any groups.|
|<tile>.tags||An array of tags (as strings) for the tile, as set in the Voxel Editor from the Model Properties panel.|
|<tile>.interact_cursor||Interaction cursor for the tile, as set in the Map Editor from the Entity Properties panel. This can be used to either retrieve or change the interaction cursor for the tile. Valid values include “default”, “walk”, “interact”, “speak”, “attack”, or any custom cursor defined in your game configuration.|