With this action you can retrieve any one of a given number of variables for the tilemap element on a layer. When you create a tile layer in the room editor, this layer holds a tilemap element which is then populated with tiles from a tileset. This tilemap element has certain values associated with it, like an offset position, the tileset being used, the width, height, etc... The complete list of values that you can get is:
- X Coordinate - The position along the x axis on the layer where the tilemap element has been placed.
- Y Coordinate - The position along the y axis on the layer where the tilemap element has been placed.
- Columns - The width (defined as the number of columns of tile cells) of the tilemap element.
- Rows - The height (defined as the number of rows of tile cells) of the tilemap element.
- Tile Width - The width of a single tile cell.
- Tile Height - The height of a single tile cell.
- Tile Set Resource - The tileset resource that has been assigned to the tilemap element for drawing.
- Current Frame - The current frame being drawn for animated tiles.
- Mask - The mask data for the tilemap element.
- Global Mask - The global mask data for all tilemap elements.
When using this action you supply the layer name (a string, as defined in the Room Editor) to get the tilemap element data from, then the type of data that you want to retrieve (as shown in the list above). The returned value will then be stored in the target variable which can have been created previously or can be a new temporary one (if you check the "Temp" check-box). Note that you can retrieve additional values by clicking the plus icon beside the action, and selecting another variable and giving another variable to store the returned value.
Argument Description Layer The layer to get data from Variable The variable to retrieve the value of (as listed above)
The above action block code checks to see if the tiles on the layer "Floor_Tiles" is using the tileset "tl_Palace", and if they not, then they are set to use it.