How do i animate a tile on a tilemap?

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

How do I…

Make an animated tile on a tilemap?

What is the expected result

The tile I’m trying to animate animates.

What is the actual result

The tile isn’t animating.

Related screenshots

Extra Notes

Im trying to make an extension for what im trying to do.

I beg

please just answer my question.

You’re using both an object variable named TilePosition and a variable named TilePosition but only increasing one of them.

If you want it to loop, you would also need to reset the tile ID.

It might be more efficient to create an array of structures or just structures with the tile numbers that need to be animated instead of scanning the entire tilemap each time. You could add the tile numbers manually or scan the tilemap at the beginning. Either create structures using the row and column as the child names or an array of structures with the row and tile as values or children named row and column.

The structure could contain the row, column and initial tile ID. You could then animate the tiles from the original number to the original number plus either a set amount like 3 or a variable amount for each tile ID.

Honesty, it might be better to just place animated sprites on top of the tilemap until they add something built-in.

I reset it. look at the bottom most event

edit; oh wait i see what you mean