How to play animation from tilesource? (SOLVED)

Guys, good day!
I experiment with tilesourses. I created a tilesource made a tilemap from it, rendered it. I altered my tilemap with tilemap.set_tile calls. That works fine for me.
But I do not see the function that plays animations from tilesources. I created an animation in tilesource, but I do not see the way to put in into tilemap, nor to spawn it from source.
Please help!

1 Like

This is a frequent question, check the link in the end :wink:

We can’t animate tiles in a tilemap yet, but there are two workarounds:

If you want to animate selected tiles from a tilemap you can either create a sprite with a tilesource and put it over a tilemap in place of those tiles and play an animation or using only a tilemap create a script that will change each tile to a next tile in animation sequence in a timer - use tilemap.set_tile.

You can animate tiles using my Defold Tilemap Animator module here: https://defold.com/assets/tilemapanimator/

2 Likes

Wow! This is amazing, thanks for this! :heart: Why didn’t I saw it earlier? :smile:

1 Like

You’re welcome! Hope it serves you well. Let me know if you encounter any issues or have any suggestions for the module.

1 Like