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 / Animated sprite playing the wrong frames

Author
Message
DsarchyUK
16
Years of Service
User Offline
Joined: 21st Nov 2008
Location: UK
Posted: 28th Dec 2008 17:35 Edited at: 28th Dec 2008 20:33
I'm having troubles using the Animated sprite command. When ever I assign frames to a keystroke it randomly plays other frames outside of its range.

the code:


there is a zip attachment that has the code as well as the media and a compiled version as well.

If you use the WASD keys the sprite will move around and the animation will play. However if you change direction before the animation loop is allowed to finish (I assume) then it will mess up and skip to a random frame. What's the correct way of using this command?

EDIT
Google forum search for "Sprite Movement" revealed a topic in the 2D board that had the code outline for an animated sprite (I thought that forum was for pictures/textures etc)

Updated, now working:


http://dsarchy.deviantart.com/

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-24 16:56:01
Your offset time is: 2024-11-24 16:56:01