Page 1 of 1

movement problem

PostPosted: Sat Aug 25, 2007 8:45 pm
by DarkParadox
on key down right i put xvelocity = xvelocity+4; and yet when i press right he moves like a centimeter and stops, whats the problem :?:

Re: movement problem

PostPosted: Sat Aug 25, 2007 8:48 pm
by d-soldier
Try this code instead:
xvelocity=+4;

and make sure it's set to "repeat" while keydown.

Re: movement problem

PostPosted: Sat Aug 25, 2007 9:06 pm
by DarkParadox
that worked thanks

Re: movement problem

PostPosted: Sun Aug 26, 2007 1:58 am
by J Maker
i use:
Code: Select all
x=x+5;//right and repeat

Code: Select all
x=x-5;//left and repeat

but dsd's code should work but wouldn't keep going after the key is let go of (key up) mine does i know that for sure.
i've also encountered a moving problem, if i use velocities to move on a side scroller or top down, if my player's moving let's say right, and he collides with the top or bottom of a square he just stops