Replacing tiles in tilemap with animated sprites

I’d like to be able to animate a few parts of my background. I’d like to have a tile in the tilemap that I could replace with sprites that have animations attached.

That seems to work OK, but the tile still shows up under the sprite. How can I remove the tile and replace it with the sprite instead?

Thanks!!

1 Like

If you already have the code to place sprites on top of each of the tiles (something along the lines of ‘for each (image) tile place sprite’), you’ll just want to clear the tiles image with this:

2 Likes

Oh, clever! Thanks. I assume it’ll accept the value from iterating an array of sprites.

Thanks again! Happy holidays! :slight_smile:

Ah, it takes the tile locations you get from the array of all tiles rather than sprites, but I think that’s what you meant (since you would likely have to be using that to get the animating sprites created in the first place!)

And happy holidays to you too!