Scripting/Client/Functions/SetMouseCursorPos

Moves the cursor (and the real pointer; v0.2.4+). Mouse-look scripts call it with the screen centre after every move.

Syntax

SetMouseCursorPos(x, y)
SetMouseCursorPos(VectorScreen)

Arguments

Example

function onScriptLoad()
{
	local pos = player.Pos;
	SetMouseCursorPos( pos.x, pos.y );
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Input

Categories: Client functions | Input