Rotate a tile in TileMap


Attached Files

The following files have been attached to this tutorial:



Download now 188.15 KB


1,725 visits, 2,338 views


This tutorial hasn't been translated.


I found a way to rotate a tile in tilemap when starting a Plumber game and I want to share with you :)

Step 1

Insert a TileMap object in your project. You can use the default TileMap from Construct 2 or import your tilemap.

We also need to add TOUCH function in project to make it work.

Step 2

We'll start the core right now.

Create a Global variable tileState .

This will be a switch while you rotate your tiles.

We'll add the condition when touching the TileMap :

(1) Compare the Tile at TouchX and TouchY if the state of tile is NORMAL.

(2) The condition tileState = 0 for you can touchable after rotate.

Then the action will be :

(1) We set the tile at TouchX and TouchY to Rotate 90 degrees.

(2) Switch tileState to 1 to break the loop of touching.

Repeat it for remaining state of tile :

Add an event to switch tileState to 0:

That's all. You can run and check the result !

If there is any question, please leave your comment here :)


I have added a condition for untouchable tile here :

All tile index > 11 are untouchable.

You can check my capx for more details.



Download now 188.15 KB

  • Order by
Want to leave a comment? Login or Register an account!