Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tile animation (ON/OFF switch case)
#1
Hi, I have some questions about tile animations.

I am trying to make an ON/OFF switch gimmick like what you can find in Super Mario Maker 2 :


In my case, the state of the switch is stored in a Boolean variable.
The best way to achieve this effect I think is through animations. However, I can't find a way to control animations to achieve this effect.
The way I achieved the gimmick is by iterating through THE ENTIRE TILEMAP and change the index of the tiles I want to switch, so, very unoptimized.

Do you know how I can achieve that?
Thanks for your answer!
Reply
#2
Hi!
I'm out on holidays now, but I'll consider it after I return. Right now there's no direct way to achieve the effect you want. It would require two new calls:
1. Query a tileset to get a list of handles of its built-in animations
2. Add an enable/disable animation call
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)