7
ModuleClientAPIGameLibController
Mees van der Wijk edited this page 2025-08-10 16:26:56 +02:00

ModuleClientApi - GameLib Controller

Class representing the GameLib Controller inside the ModuleClientAPI.

Methods

call

Send a controller action to the active game.

Controller.call(action, mode, intensity?);
Argument Type Description
action "left" / "right" / "up" / "down" / "upleft" / "upright" / "downleft" / "downright" / "start" / "select" / "back" / "identify" The action to send.
mode "on" / "off" The mode of the action.
(Optional) intensity number The intensity of the button press (between 0 and 1).

callCustom

Send a controller action to the active game.

Controller.callCustom(action, mode, intensity?);
Argument Type Description
action string The action to send.
mode "on" / "off" The ID of the controller.
(Optional) intensity number The intensity of the button press (between 0 and 1).

joinQueue

Join the queue of the room.

Controller.joinQueue();

Events

on: outsideRoom

Triggers when the user goes outside of the room.

Controller.on('outsideRoom', () => {});

on: insideGame

Triggers when the user is requested from the queue.

Controller.on('insideGame', () => {});

on: insideQueue

Triggers when the user joins the room of the queue.

Controller.on('insideQueue', () => {});

on: endScreen

Triggers when the endscreen should be shown.

Controller.on('endScreen', (endScreen) => {});
Argument Type Description
endScreen EndScreen The endscreen data.

on: queuePositionUpdate

Triggers when the queue position updates.

Controller.on('queuePositionUpdate', (position) => {});
Argument Type Description
position number The new position in the queue.

on: activeGameChanged

Triggers when the queue position updates.

Controller.on('activeGameChanged', (gameDetails) => {});
Argument Type Description
gameDetails GameDetails The game details of the current active game.