---
title: Rumble Functions
slug: gpc/gpc-scripting-rumble-functions
description: Here is the list of Rumble Functions.
icon: ◽
docTags: 
createdAt: 2021-12-08T18:04:47.000Z
---

The Cronus allows you to completely control the Rumble Motors on your controller, including the Trigger Rumble motors on an Xbox One controller. Below are the GPC commands relating to these motors.

| 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 speed of the chosen rumble motor on the controller in the form of an int. The value returned can range from 0 to 100 which represents the speed as a percentage ( % ).

:::CodeblockTabs
GPC

```apex
main {
 
    if(get_rumble(RUMBLE_A) > 50) {  // If Rumble Motor A is running greater than 50% 
                                     // do something
    }
 
}
```
:::

🔴 **Syntax**

:::BlockQuote
get\_rumble ( \<rumble\_identifier> );
:::

⚪&#x20;**Parameters**

\<rumble\_identifier> : the identifier of a rumble motor.

🔵&#x20;**Returns**

An **int&#x20;**&#x72;anging from 0 to 100 which represents the current speed of the chosen motor.

# set\_rumble

`set_rumble` sets the speed of the chosen rumble motor on the controller.

The rumble motors are numbered 0 to 3.  To make it easier to remember which motor is which, four constants have been created:

| Name       | Description                                     | Value |
| ---------- | ----------------------------------------------- | ----- |
| RUMBLE\_A  | Strong Rumble Motor (Usually the Left Motor)    | 0     |
| RUMBLE\_B  | Weak Rumble Motor (Usually the Right Motor)     | 1     |
| RUMBLE\_RT | Right Trigger Motor (Xbox One controllers only) | 2     |
| RUMBLE\_LT | Left Trigger Motor (Xbox One controllers only)  | 3     |

:::CodeblockTabs
GPC

```apex
set_rumble(RUMBLE_A, 50);
```
:::

🔴 **Syntax**

:::BlockQuote
set\_rumble (\<rumble\_identifier>,\<rumble\_speed>);
:::

⚪&#x20;**Parameters**

\<rumble\_identifier> : the identifier of a rumble motor.
\<rumble\_speed> : Percentage value of the rumble motor ranging 0 - 100 represented as an int.

🔵&#x20;**Returns**

None

# block\_rumble

`block_rumble` does as it implies and blocks any rumble signals to the controller.  Once this function is used, it remains active until such time as it is reset in the script or the script is unloaded. Example of usage:&#x20;

:::CodeblockTabs
GPC

```apex
main {   
      
       if(event_press(XB1_A)) {  // If A / Cross is pressed...        
              block_rumble();  // Block rumble signals to the controller
              } 
       }
```
:::

🔴 **Syntax**

block\_rumble ( );&#x20;

⚪&#x20;**Parameters**

None

# reset\_rumble

`reset_rumble` returns control of the rumble motors to the console.  It also deactivates block\_rumble if it is active. Example of usage:&#x20;

:::CodeblockTabs
GPC

```apex
main { 
        
    if(event_press(XB1_A)) {  // If A / Cross is pressed...        
        reset_rumble();  // Reset the rumble state    
        } 
    }
```
:::

🔴 **Syntax**

reset\_rumble ( );&#x20;

⚪&#x20;**Parameters**

None



