# Rumble in game control plus

**URL:** <https://discourse.processing.org/t/rumble-in-game-control-plus/4880>\
**Category:** Libraries\
**Created:** [October 25, 2018, 5:46pm UTC](https://discourse.processing.org/t/rumble-in-game-control-plus/4880 "2018-10-25T17:46:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Whahahahaha](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@Whahahahaha](https://discourse.processing.org/u/Whahahahaha)\
**Post date:** [October 25, 2018, 5:46pm UTC](https://discourse.processing.org/t/rumble-in-game-control-plus/4880/1 "2018-10-25T17:46:46Z")

</div>

okay so in the game control plus library there are functions for rumble : ([http://lagers.org.uk/gamecontrol/ref/classorg\_1\_1gamecontrolplus\_1\_1\_control\_device.html](http://lagers.org.uk/gamecontrol/ref/classorg_1_1gamecontrolplus_1_1_control_device.html))  
but somehow I can’t see any of them with the getNumberOfRumblers() function, it just returns 0.  
also found this: [https://forum.processing.org/two/discussion/10349/gamecontrolplus-send-a-value-to-a-joystick](https://forum.processing.org/two/discussion/10349/gamecontrolplus-send-a-value-to-a-joystick)  
where @quark says it’s not possible to send data to the joystick?  
but then why are the rumbler-functions in game control plus and why can’t i at least see them?

Code just in case:

```auto
import net.java.games.input.*;
import org.gamecontrolplus.*;
import org.gamecontrolplus.gui.*;

ControlIO control;
ControlDevice stick;

void setup() {
  control = ControlIO.getInstance(this);
  stick = control.getMatchedDevice("xbox controller config");
  if (stick == null) {
    println("no controller found");
    System.exit(-1);
  }
}

void draw() {
  int nRumble = stick.getNumberOfRumblers();
  println(nRumble); //returns 0
stick.rumble(100); //does nothing..

}

```

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [October 25, 2018, 6:11pm UTC](https://discourse.processing.org/t/rumble-in-game-control-plus/4880/2 "2018-10-25T18:11:04Z")

</div>

As the website says this library is based on an abandoned Processing 2 library, so I added some enhancements and made it work in Processing 3 but kept the original API which includes `getNumberOfRumblers()` and `rumble()`.

If your stick has rumblers and `getNumberOfRumblers()` returns zero then I can’t do anything about it because the core of the original library is based on JInput and some OS specific system files, both of which are ancient and neither of which I have the resources to modify.

Sorry about that.

BTW if `stick.getNumberOfRumblers()` returns zero then you wouldn’t expect `stick.rumble(100)` to work. 🤔
