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.

Newcomers DBPro Corner / Why wont sprite animate

Author
Message
Chernobyl
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 6th Jul 2007 02:39
Why wont my sprite animate? In addition how does one make it so that it ONLY animates when its moved, so that it dosnt run in place for example. Thanks



LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 6th Jul 2007 04:41
You need to use the command PLAY SPRITE in order to animate it. After an arrow key is pressed, tell it to play the sprite. Like this


You should list a sync rate after the SYNC ON command. You'll notice that I slowed it down to 1 with each move instead of 5, because Mario simply flew across the screen so fast that you couldn't see any animation anyway (my computer is pretty fast).

I would suggest moving the sprite command to near the end of your main loop. That way, it gets drawn after all of the changes have been made to xpos and ypos.

LB
Chernobyl
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 6th Jul 2007 06:01 Edited at: 6th Jul 2007 06:02
Do'h! Thanks!!

Login to post a reply

Server time is: 2024-11-25 15:48:06
Your offset time is: 2024-11-25 15:48:06