Been experimenting with how to synchronize a gif animation to an event. In this case a baseball pitcher throws a ball when the player taps “pitch”. Next I need to figure out how to reset the pitcher to the starting frame as it currently stops on the last frame. Anyway. Take a look and remix to to see
This might help
I downloaded a pitch Gif and coded this.
The pitcher throws the ball when clicked.
You can see the code on this video.
That’s cool. I’m going to try. wondering if we need more gif controls in the event manager, like WHEN object / GIF/ On Frame X DO something. That might get rid of the need for counters?
The Polygon mask would be different for each frame of a Gif right? if the frames were of noticeably different sizes.
On the last Gif frame, if a small dot was in front of the pitcher, the polygon mask would be bigger horizontally.
The larger polygon mask could touch a sprite (collide could be used for sliding the pitcher slighly)
When the pitcher collides with a sprite, set the ball position to the pitcher.
Forever have the ball move left.
This might be difficult for users not understanding collision masks,Gifs.
I think something like this would make it easier to connect gifs with events.