Set Tile Data Transform


With this action you can change one of three tile transforms in the tiledata. You supply the variable that holds the tiledata for the tile, then select the transform to change. Clicking the "Apply" check-box will apply that transform and un-checking it will remove it. The tiledata is simply a value that reflects the index of the tile along with the transforms applied as well as any custom tile masks that you have used, and this action permits you to change three of those values: Flip, mirror and rotate. Note that you will normally want to get the tiledata first using either Get Tile Data In Cell or Get Tile Data At Pixel, then apply the requred transform(s) and then set the tile in the tilemap again using Set Tile Data In Cell or Set Tile Data At Pixel, since this action only sets a value but does not apply it to the tile it was taken from. For more information on tiledata, please see the GML section on Tilemaps - Tile Functions.

Action Syntax:

Set Tile Data Transform Syntax


Argument Description
Tile The tiledata for the tile to change
Transform The the transform to apply/remove


Set Tile Data Transform Example
The above action block code gets the tiledata at the mouse position and then checks to see if the tile has had a rotation transform applied to it. If it has then the transform is reset and the tiledata sets the tile at the position again.