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.

Dark GDK / about animated sprites...

Author
Message
jayRon
13
Years of Service
User Offline
Joined: 10th Feb 2011
Location:
Posted: 13th Feb 2011 17:27
why does my sprite don't animate again after i called this method he second time around???


if(dbMouseClick()==1)
{
dbShowSprite(Blast_ID);

while(dbSpriteFrame(Blast_ID)<25)
{
bSprite(1,dbMouseX(),dbMouseY(),CURSOR_ID);
dbPlaySprite(Blast_ID,1,25,150); dbSync();
}



}
Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 14th Feb 2011 20:12
Because after the sprite frame reaches 25, the while loop will never be executed again. When the sprite finished playing, set back the current frame to 1. For example:

Login to post a reply

Server time is: 2024-06-23 02:31:02
Your offset time is: 2024-06-23 02:31:02