Menu

Rumble

 
      Just like with the player LEDs, the GPC language also can handle the controller rumbles.
 
  Related GPC Functions:
 
get_rumble    Returns the current value of a rumble
set_rumble    Set the value of a rumble (engine speed)
block_rumble  Blocks any rumble action sent by the console
reset_rumble  Unblocks the rumble (if it is blocked)
 
  Rumble Identifiers:
 
RUMBLE_A: Strong
RUMBLE_B: Weak
RUMBLE_RT: Right trigger rumble (XBox One controller)
RUMBLE_LT: Left trigger rumble (XBox One controller)
 
  Example of usage:
 
      Once a rumble is activated by the script the rumble engine will remain activated until the script send a command to turn it off.
 
combo RumbleExample {
    // Vibrate the controller for 1 second
    set_rumble(RUMBLE_A, 100);
    wait(1000);
 
    // Turn the rumble off
    set_rumble(RUMBLE_A, 0);
}
 

  1. get_rumble

      Returns the current value of a rumble.
 
  Prototype:
 
int get_rumble ( <rumble_ident> )
 
  Parameters:
 
<rumble_ident> : the identifier of a rumble
 
  Return:
 
the rumble (engine) speed, can range from 0 (off) to 100 (max speed)
 
  Example:
 
if(get_rumble(RUMBLE_A) == 100) {
    /* Rumble A is running at max speed */
}
 

  2. set_rumble

      Set the value of a rumble (engine speed).
 
  Prototype:
 
set_rumble ( <rumble_ident> )
 
  Parameters:
 
<rumble_ident> : the identifier of a rumble
 
  Return:
 
None
 
  Example:
 
set_rumble(RUMBLE_RT, 80);
 

  3. block_rumble

      Blocks any rumble action sent by the console.
 
  Prototype:
 
block_rumble (  )
 
  Parameters:
 
None
 
  Return:
 
None
 
  Example:
 
block_rumble();
 

  4. reset_rumble

      Unblocks the rumble (if is blocked), and set its values to 0.
 
  Prototype:
 
reset_rumble (  )
 
  Parameters:
 
None
 
  Return:
 
None
 
  Example:
 
reset_rumble();
(This work is NOT endorsed by, sponsored by, or affiliated with any game publisher or trademark holder. All trademarks are the property of their respective owners. Some game publishers may restrict the use of third-party peripherals; please refer to the applicable game's Terms of Use. Users are responsible for ensuring their compliance with any applicable game rules or restrictions.)