I'm just trying to make a simple sprite move from Right to Left while playing an animation but I keep encountering to problems.
First, lets say my sprite is moving right and I reverse direction my sprite moves left fine but keeps facing right. Eventually it faces left and walks fine but the delay looks really weird and makes the sprite look like its moonwalking.
Secondly, I can't seem to get dbPlaySprite() to play the entire animation on command instead it just plays one frame. I got around this by calling dbPlaySprite() again outside of the "dbKey() if check" but calling the function twice seems redundant.
so if anyone could help that would be great, here is my code...
void DarkGDK ( void )
dbSyncOn ( );
dbSyncRate ( 60 );
dbDisableEscapeKey ( );
dbSetImageColorKey ( 255, 0, 255 );
while ( LoopGDK ( ) )
if (dbSpriteFrame(1) > 7 && dbSpriteFrame(1) < 10)
if (dbSpriteFrame(1) > 4 && dbSpriteFrame(1) < 7)
if ( dbEscapeKey ( ) )
dbSync ( );
Oh and here is the image i'm using, i dont know how to post it so i'll add it as an attachment