User Tools

Site Tools


tile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tile [2021/04/30 11:04]
justin
tile [2021/11/05 19:57] (current)
justin
Line 5: Line 5:
  
 =====Scripting===== =====Scripting=====
-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 [[script_syntax|assignment statement]], it will be noted in the description.+Refer to the table below for a list of tile properties that can be accessed from a [[script]]. If the property's value can be changed using an [[script_syntax|assignment statement]], it will be noted in the description.
 ^Property^Description^ ^Property^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>.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>.type|Type of [[entity]], in this case the constant value TILE.|
 |<tile>.coord|[[Coordinate]] 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>.direction|[[Cardinal direction]] (NORTH, SOUTH, WEST, EAST) in which the tile is rotated. The default direction of an [[entity]] is SOUTH.|
Line 14: Line 15:
 |<tile>.tags|An [[array]] of tags (as [[string|strings]]) for the tile, as set in the [[Voxel Editor]] from the [[Model Properties]] panel.| |<tile>.tags|An [[array]] of tags (as [[string|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]].| |<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]].|
 +|<tile>.property["x"]|Custom property stored on the tile, where "x" is a [[string]] containing the name of the property. This can be used to either retrieve or change the property's value.|
 +|<tile>.model|Name of the tile's model (e.g. "grass").|
 +|<tile>.frame|Current [[animation]] frame (as a [[number]], with the first frame being 1). This can be used to either retrieve or change the model's current frame. If this property is changed and an [[animation]] is playing, the [[animation]] will first be stopped.|
 +|<tile>.animations|An [[array]] of [[animation]] names defined for this tile. The names will be [[string]] values.|
 +|<tile>.terrain_type|[[terrain_types|Terrain type]] assigned to the tile (as a [[string]], or null if none is assigned).|
 +|<tile>.attach_points|An [[array]] of [[attach_points|attach point]] names defined for this tile (across all [[animation]] frames). The names will be [[string]] values. The [[array]] will be empty if no [[attach points]] are defined.|
 +|<tile>.waypoints|An [[array]] of waypoint names defined for this tile. This property will be null if the tile is not currently configured as a moving [[platforms|platform]].|
  
 ~~NOTOC~~ ~~NOTOC~~
tile.1619805850.txt.gz ยท Last modified: 2021/04/30 11:04 by justin