Get Tile Data In Cell Icon Get Tile Data In Cell

With this action you can get the tile data for a tile cell on a tile map layer. The tile data is simply a value that reflects the index of the tile along with the flip, mirror, and rotate values, as well as any custom tile masks that you have used. With this action you first supply the layer to target using the name of the layer (a string) as defined in the room editor, and then the column and row of the tile map layer to get the tile-data for. The "cell" is the area on the tile map grid that holds the tile you want to get the data from, so if your tiles are 16x16, for example, and the room is 1024x768 the tile-map will have 64 columns and 48 rows.

NOTE The layer selected must have been defined as a Tile Map Layer in The Room Editor, otherwise you may get errors.

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). For more information on tile data, please see the GML section on Tile Map Functions.

 

Action Syntax:

Get Tile Data In Cell  Action

Arguments:

ArgumentDescription
LayerThe layer to get the tile from
ColumnThe column (from left to right) of the cell

 

Example:

Get Tile Data In Cell ExampleThe above action block code loops through every tile cell in the room, retrieves the tile data for the cell, mirrors it, then sets the cell again.