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.

Windows / Delete sprite after animation complete

Author
Message
niansenx
2
Years of Service
User Offline
Joined: 29th Jan 2016
Location:
Posted: 10th Feb 2016 14:11
Hello

I have a sprite that has a five-frame animation. The sprite can appear multiple times on the screen at once, which I can do fine. But is there a way to delete each sprite as soon as the anination is complete? I don't want to leave the sprites on the screen.

Thanks
BatVink
Moderator
14
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Feb 2016 15:04
You could use GetSpritePlaying(), and when it resets to 0, you know to delete the sprite. You'll have to check this in your code, you can't delete them automatically.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
niansenx
2
Years of Service
User Offline
Joined: 29th Jan 2016
Location:
Posted: 10th Feb 2016 20:40
Thanks. I'll try that.

Login to post a reply

Server time is: 2018-02-21 10:51:32
Your offset time is: 2018-02-21 10:51:32