Scripting/Client/Functions/ToggleMouseMovement

(v0.2.9-r2+) false stops the mouse from turning the camera or aiming while everything else (walking, buttons, the GUI cursor) keeps working. Pair it with ShowMouseCursor(true) while a GUI is open and call it with rue when you close the GUI. It is reset automatically when the script unloads. PC only: on Android the function exists but does nothing.

Syntax

ToggleMouseMovement(bool)

Arguments

Example

function onScriptLoad()
{
	ToggleMouseMovement( true );
}

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

Section: Input

Categories: Client functions | Input