Page MenuHomeFeedback Tracker

Add Controller Input Commands/Eventhandlers
Acknowledged, WishlistPublic


Currently the scripting language has a severe lack of raw input commands. Its literally impossible to get raw analog input, from something like a joystick. Button presses on controller's can't be detected from scripts.

The community lacks the ability to utilize these input methods in scripts. Allowing scripters to get input from already supported devices could open new doors for user interaction. This is something scripters have been struggling with for years, forcing us to use unreliable workarounds. The biggest pain is knowing the engine supports these inputs, its just the scripting language has no access to them.


Legacy ID
Feature Request
Additional Information

Possible commands:
getControllers array - gets array of supported controllers (visible in controls menu)

controllerId getAnalogInput analogId - gets state of given controller analog input

controllerId joystickButtonState buttonId - gets state of given controller button

Possible display event handlers:
(findDisplay 46) displayAddEventHandler ["onAnalogInput",{
fired when an analog input is changed
_display = _this select 0;
display eh is added to
_controller = _this select 1; name of controller
_analogId = _this select 2;
id of analog input type (x,y,z, etc)
_analogInput = _this select 3;// state of analog input (-1 to 1, etc)

(findDisplay 46) displayAddEventHandler ["onJoystickButton",{
fired when a controller buttom is pressed
_display = _this select 0;
display eh is added to
_controller = _this select 1; name/id of controller
_buttonId = _this select 2;
id of controller button (1,2,3, etc)

Event Timeline

Waffle_SS edited Additional Information. (Show Details)Apr 4 2015, 7:06 AM
Waffle_SS set Category to Feature Request.
Waffle_SS set Reproducibility to N/A.
Waffle_SS set Severity to None.
Waffle_SS set Resolution to Open.
Waffle_SS set Legacy ID to 655761612.May 8 2016, 11:49 AM