Skip to content

Game Controller sub-actions

Get Controller State

Reads what a game controller is doing right now (held buttons, stick positions, battery) into variables for later steps.

Setting What to put in
Controller Which controller to read. Type its number like #1 (the first one), part of its name, or its kind like PS5. Only the first match is read. Starts as: #1.

Variables it adds

Variable What it holds
%controllerConnected% True when that controller was found
%controllerName% The controller's name
%controllerIndex% The controller's number (#1 is the first one)
%controllerType% The kind of controller, like "PS5" or "Xbox One"
%batteryPercent% The battery level, in percent
%batteryState% Whether it is on battery or charging
%heldButtons% Buttons held down right now, separated by commas
%axisLeftX% How far the left stick is pushed left-right, -1 to 1 (also axisLeftY, axisRightX, axisRightY, axisLeftTrigger, axisRightTrigger)
%hat1% The D-pad direction, like "Up" or "Centered"

Type id: controller.getState

Get Controllers

Gets the list of connected game controllers into variables for later steps.

Variables it adds

Variable What it holds
%controllerCount% How many controllers are connected
%controllerNames% Their names, separated by commas
%controller0Name% The first controller's name (controller1Name is the second, and so on)
%controller0Index% The first controller's number
%controller0Type% The first controller's kind

Type id: controller.getList

Rumble

Makes a game controller vibrate for a moment. Fun as feedback when something happens, like a new follower.

Setting What to put in
Controller Which controller to use. Any means every connected controller. Or type its number like #1, part of its name like "DualSense", or its kind like PS5. Separate several with commas. Starts as: Any.
Low-frequency motor (%) How strong the big, heavy motor is, from 0 (off) to 100 (full). Starts as: 50.
High-frequency motor (%) How strong the small, buzzy motor is, from 0 (off) to 100 (full). Starts as: 50.
Duration (ms) How long to vibrate, in milliseconds (1000 is one second). The most is 60000. Use 0 to stop vibrating. Starts as: 500.

Variables it adds

Variable What it holds
%controllersAffected% How many controllers vibrated

Type id: controller.rumble

Set LED Colour

Changes the colour of the light on a game controller, for controllers that have one such as the PS4 and PS5 pads.

Setting What to put in
Controller Which controller to use. Any means every connected controller. Or type its number like #1, part of its name like "DualSense", or its kind like PS5. Separate several with commas. Starts as: Any.
Colour The colour as a hex code like #0080FF, or as three numbers like 0,128,255. Controllers without a colour light ignore it. Starts as: #0080FF.

Variables it adds

Variable What it holds
%controllersAffected% How many controllers changed colour

Type id: controller.setLed