Cronus GPC Documentation
Cronus CommunityGPC LibraryGPC Guide
  • Welcome
  • Introduction
    • GPC Explained
    • What's New with Zen?
  • Basic Syntax
  • A Simple Tutorial
  • Style Guide
  • GPC Structure
  • Basic GPC Structure
  • Definitions
  • Data Section
  • Remapping
  • Variables
  • Init Section
  • Main Section
  • Combo Section
  • User Created Functions
  • GPC Programming Basics
  • Constants
    • Zen
      • OLED
      • ASCII Constants
      • PIO
    • Keyboard
      • Keyboard
    • Controller
      • Polar
      • LED
      • Rumble
      • PS3
      • PS4
      • XBox 360
      • Xbox One
      • Nintendo WII
      • Nintendo Switch
    • Racing Wheel
      • G29
      • G27
      • G25
      • DF
      • DF GT
      • DF Pro
    • Trace
    • Memory
    • Misc
  • Flow Control
  • Persistent Memory
  • Operator Types
  • Identifiers
  • Functions & Commands
    • Internal Functions
      • Bit Functions
      • Combo Functions
      • Math Functions
      • Device Functions
      • OLED Display Functions
    • Console Functions
      • Core Console Functions
    • Controller Functions
      • Core Controller Functions
      • Rumble Functions
      • LED Functions
    • Keyboard Functions
      • Core Keyboard Functions
  • GPC Examples
    • #1
Powered by GitBook
On this page
  • get_rumble
  • set_rumble
  • block_rumble
  • reset_rumble

Was this helpful?

  1. Functions & Commands
  2. Controller Functions

Rumble Functions

PreviousCore Controller FunctionsNextLED Functions

Last updated 4 years ago

Was this helpful?

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

Zen

Plus

Returns the current value of a Rumble Motor

✔️

✔️

Sets the speed of a Rumble Motor

✔️

️✔️

Blocks any rumble signals from the console

✔️

✔️

Resets the rumble state and returns 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 ( % ).

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

Syntax

get_rumble ( <rumble_identifier> );

Parameters

<rumble_identifier> : the identifier of a rumble motor.

An int ranging 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

set_rumble(RUMBLE_A, 50);

set_rumble (<rumble_identifier>,<rumble_speed>);

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

None

block_rumble

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

block_rumble ( );

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:

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

reset_rumble ( );

None

Returns

Syntax

Parameters

Returns

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 in the script or the script is unloaded. Example of usage:

Syntax

Parameters

Syntax

Parameters

🔴
⚪
🔵
🔴
⚪
🔵
🔴
⚪
🔴
⚪
reset
get_rumble
set_rumble
block_rumble
reset_rumble