Hello, i have a problem. When i walk left and right my sprite moves fine. He will go left then right and animate perfectly. The problem is when i go left for awhile then go up he wont switch to the first frame of the up animation. Instead he will look right and then go up.
So basically its almost like hes turning but it screws things up and i dont want this. I know its really hard to explain, so heres a video of the problem.
http://www.youtube.com/watch?v=a8NQV8FZmhU
Any idea what is causing this? here is my code.
if(dbDownKey())//do something on user input
{
y = y + speed;
dbPlaySprite ( i, 1, 4, 60 );
dbSprite ( i, x , y, i );;
}
if(dbUpKey())//do something different on different user input
{
y = y - speed;
dbPlaySprite ( i, 13, 16, 60 );
dbSprite ( i, x , y, i );
}
if(dbLeftKey())//do something different on different user input
{
x = x - speed;
dbPlaySprite ( i, 5, 8, 60 );
dbSprite ( i, x , y, i );
}
if(dbRightKey())//do something different on different user input
{
x = x + speed;
dbPlaySprite ( i, 9, 12, 60 );
dbSprite ( i, x , y, i );
}
Also on a simpler note. How would i do this:
dbText(0, 0, "Strength", str2);
I can display the text strength or my string but not both. Thanks