Jump to content

Lua animation


YouGroove
 Share

Recommended Posts

In Lua using AnimationManager, it is possibleto know how much some playing animation

has played like 50%, 70% ?

 

I use callback method at the end of animation; but having some info like that i could avoid to use some timer and be more precise for some stuff.

Stop toying and make games

Link to comment
Share on other sites

You'd probably have to code that yourself, but I've always used a special frame callback. This would be a frame that once it goes past during playing the animation a callback function is called so you can do certain things. I used it for RPG type games where normally at a certain frame in a casting spell (for example) you want to make a particle effect happen or whatever.

Link to comment
Share on other sites

Yes that's exactly that, independent from frame rate or time delay, but based on animation.

Another way could be to trick it by splitting some animation in two animations , so once first half is played you do your stuff and play second half But well it's not super natural in workflow indeed and will ask more work than just checking 50% by code.

 

I think it can be done in Animation manager, but i didn't understood all it's Lua code.

Stop toying and make games

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...