im trying to create a code that limits the speed of the mouse which controls a player. this is what it looks like so far
but for some reason the player is limited to the positive movements of the mouse axices. Eventually this will cause the player to move to the bottom right corner of the screen and stay there. any suggestions , mods , or entire code rewrites is highly apprecited ,and thanks in advance!
while not keydown(1) oldmousex = newmousex oldmousey = newmousey newmousex = MouseX() newmousey = MouseY() newmousex=newmousex-oldmousex newmousey=newmousey-oldmousey newmousex=newmousex/3 newmousey=newmousey/3 player_x=player_x+newmousex player_y=player_y+newmousey ; stuff goes here wend
but for some reason the player is limited to the positive movements of the mouse axices. Eventually this will cause the player to move to the bottom right corner of the screen and stay there. any suggestions , mods , or entire code rewrites is highly apprecited ,and thanks in advance!