Hello, does anyone know if it is possible to turn the player (player.pan) with the mouse without using mouse_force.x ?

This is what I allready have but when the cursor is at 0 or screen_size.x the player stops turning. I somehow need to reset the mouse_pos.x and old_mouse_pos_x...

Code:
var speed;
var old_mouse_pos_x;

starter test
{
	while(1)
	{	
		speed = old_mouse_pos_x-mouse_pos.x;
		old_mouse_pos_x = mouse_pos.x;
		mouse_map = NULL;
		mouse_mode = 1;
	
		if(player)
		{
			player.pan += speed * time;
		}
		wait(1);
	}
}