For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rumble Functions

The functions in this section are specifically used to interact with the rumble motors of the controller.

Function Name

Description

get_rumble

Returns the current value of a Rumble Motor.

set_rumble

Sets the speed of a Rumble Motor.

block_rumble

Blocks any rumble signals from the console.

reset_rumble

Resets the rumble state and returns the condition of the motors to the console.


get_rumble

get_rumble returns the current value of a rumble motor in the form of an int. The value represents the speed of the motor as a percentage from 0 to 100.

Code-Snippet

main {
    if(get_rumble(RUMBLE_A) > 50) {
        // If the rumble motor A is vibrating more than 50%, do something
    }
}

Syntax

get_rumble ( <identifier> );

Parameters

<identifier> : the identifier of a rumble motor.

Returns

The current value of the specified identifier. Can range from 0 to 100.


set_rumble

set_rumble allows you to manually control the rumble motors of a controller. This will override the signals normally sent by the console.

Code-Snippet

Syntax

set_rumble ( <identifier> , <speed> );

Parameters

<identifier> : the identifier of a rumble motor.

<speed> : the speed/strength of the vibration (0 to 100).

Returns

Nothing


block_rumble

block_rumble prevents any rumble signals from the console from being forwarded to the controller. This is useful if you wish to disable vibration in a game completely without changing in-game settings.

Code-Snippet

Syntax

block_rumble();

Parameters

None

Returns

Nothing


reset_rumble

reset_rumble resets any modifications made to the rumble motors by set_rumble and returns control to the console. It also immediately turns off any manually activated motors.

Code-Snippet

Syntax

reset_rumble();

Parameters

None

Returns

Nothing

Last updated