A gif that pitches a baseball on tap

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

https://ready.app.link/KOYYp1pzVI

2 Likes

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.

1 Like

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?

2 Likes

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.

1 Like

I think something like this would make it easier to connect gifs with events.

2 Likes