Lua:setXBox360ControllerVibration

From Cheat Engine
Jump to navigation Jump to search
<> Function

function setXBox360ControllerVibration(ControllerID, leftMotor, rightMotor) : void

Sets the vibration speed of the left and right motors inside the Xbox 360 controller.

The motor values range from 0 to 65535, where 0 disables the motor.

Function Parameters[edit]

Parameter Type Description
ControllerID Integer The ID of the controller to set the vibration for. Valid values range from 0 to 3.
leftMotor Integer The vibration speed of the left motor. The value ranges from 0 to 65535, where 0 is off.
rightMotor Integer The vibration speed of the right motor. The value ranges from 0 to 65535, where 0 is off.

Returns[edit]

void — This function does not return any value.

Examples[edit]

-- Set both vibration motors to full speed
setXBox360ControllerVibration(0, 65535, 65535)

-- Stop both vibration motors
setXBox360ControllerVibration(0, 0, 0)

See also[edit]

Lua
Script Engine