Jump to content
Search Community

Stop a sprite animation on repeat and stop

eisaias2000 test
Moderator Tag

Go to solution Solved by eisaias2000,

Recommended Posts

makes sense to call a function, thank you! 👏 

 

Do you think that this solution functions in a more complex timeline? My intent is to make an animation where one caracter talks, then stop talking, other caracter start talking and then the fist caracter start talking again.

Link to comment
Share on other sites

Hi,

 

In that case I would look into using call and addPause methods and two different timelines:

https://gsap.com/docs/v3/GSAP/Timeline/addPause()

 

https://gsap.com/docs/v3/GSAP/Timeline/call()

 

So basically create a single timeline for each spritesheet. Something like this:

 

See the Pen zYexZEQ by GreenSock (@GreenSock) on CodePen

 

Basically each timeline resumes the other and pauses itself immediately as well.

 

Hopefully this helps.

Happy Tweening!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...