Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Sprite animation - How to know when an animation ends?

Author
Message
LeGugusse
17
Years of Service
User Offline
Joined: 15th Feb 2007
Location: Paris - France
Posted: 20th Apr 2012 16:08
Hi,
I've a warrior sprite with a sword.
I launch the attack animation with no loop and I want to know when this animation ends, to display my warrior idle animation.

How can I know that?

Thanks.

Cry "Havoc!" and let slip the dogs of war
LeGugusse
17
Years of Service
User Offline
Joined: 15th Feb 2007
Location: Paris - France
Posted: 20th Apr 2012 16:14
Ok, i found a way to know:

GetSpriteCurrentFrame( iSpriteIndex )

gives me the current frame.

Cry "Havoc!" and let slip the dogs of war
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 21st Apr 2012 18:28 Edited at: 21st Apr 2012 18:29
You can also use the getspriteplaying() command for the example you gave.

Login to post a reply

Server time is: 2024-11-23 08:50:33
Your offset time is: 2024-11-23 08:50:33