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 help.

Author
Message
Josk
16
Years of Service
User Offline
Joined: 2nd Apr 2008
Location:
Posted: 26th Aug 2011 22:48
I'm wanting to run an animation through 32 frames then when at frame 32 for the sprite to be deleted.

I have tried a few ways but with no luck, any help would be appreciated.
Some code I have tried below.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 26th Aug 2011 23:03
Instead of using a for/next loop, you might try letting the animation just play, with the looping parameter set to zero, and use GetSpritePlaying() to check if it's still playing. If not, delete it, 'splode it, whatever.

Josk
16
Years of Service
User Offline
Joined: 2nd Apr 2008
Location:
Posted: 26th Aug 2011 23:20
Thanks for reply, I tried it that way first with no luck.

With both ways I either can get the animation to play and then stop on screen or the sprite to disapear before the animation is run.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 27th Aug 2011 03:06
Sounds easy enough as Rich Dersheimer says.

Not tried it, but it should work.

Josk
16
Years of Service
User Offline
Joined: 2nd Apr 2008
Location:
Posted: 27th Aug 2011 10:01
I had put the code in the wrong place, I thought it would be something like that.

I should have posted the entire code you would have spotted it straight away. Another case of just walking away from your code and looking again some time later.

Login to post a reply

Server time is: 2024-04-18 13:48:58
Your offset time is: 2024-04-18 13:48:58