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 / Moving sprite help

Author
Message
bkbranch
18
Years of Service
User Offline
Joined: 26th Sep 2006
Location:
Posted: 28th Nov 2006 21:25
I need a bit of help with the code for moving an animated sprite I'm working on. The sprite animates okay except sometimes when I change directions it goes through other frames first. For example when moving right then switching to left it will change to frames facing down before facing left.

I attached the sprite image I'm using for now. I'm just starting out with this and would appreciate any help and also any contructive criticism so far too.




Thank You

Attachments

Login to view attachments
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 28th Nov 2006 23:10
I'm pretty sure it has to do with it not getting to the delay before it's told to use another set of frames.

You can avoid it by doing a check to see if the current frame being shown is between the frames you want to switch it to... if it isn't then switch to the first frame of the new set.


bkbranch
18
Years of Service
User Offline
Joined: 26th Sep 2006
Location:
Posted: 29th Nov 2006 00:34
Thanks a million. That worked great

Login to post a reply

Server time is: 2024-11-27 01:54:23
Your offset time is: 2024-11-27 01:54:23