do this:
if (dbRightKey() != 0)
{
if(Rightkeytimer==0)
{
moveX++;
}
Rightkeytimer=Rightkeytimer+1;//you could use Rightkeytimer++;
}
else
{
Rightkeytimer=0;
}
declare the Rightkeytimer as an int, "int Rightkeytimer;" before void DarkGDK ()
and do the same for the other variables... obiously with their respective names.
what this code does is that it checks to see if right is being pressed. if it is pressed, then check if the timer is 0, if so, add 1 to movex and 1 to the timer... so next time it tries to enter to add 1 to movex it wont since the timer is 1 then 2 then 3 and so on... and, the most important part is resetting the timer if the key is not being held, that is done in the else. if the key is not being press the timer is 0.
Hope it helps
it will work
OR you could in fact, use Bran flakes91093 inputstate class which is very handy.
hi