Hello, I've started making my tile game and the problem I am currently Facing is tile movement, i want my player to move on a 40x40 tile grid
in other words tile by tile but not just jumping tile by tile but smooth moving.
that means that if i press the say, left key my sprite moves left but when i realise my left key and my sprite isn't centerd on the tile it moves a bit forvard.
this is the code for the right arrow key:
if ( dbKeyState ( 205 ) )
{
x=x+5;
dbSprite ( 2, x, 50, 1);
}
else
if (x%40!=0)
x=x+5;
this code works perfectly and does just what i want but the problem is when i combine all of the arrow key comands it messes up the movement... cause when right is not pressed left MIGHT be pressed but right still STOPS MY SPRITE!!!!!!!!
can anyone help!?
fency federejshn