Gamepad()
Asks the connected controllers, like a gamepad's blocks in other Scratch dialects. Players are numbered 1 to 4 in the order the controllers sit in the system's joystick slots; a controller without a known layout (an unmapped pad) is skipped. Without a player number, every method looks at all controllers: isButtonPressed(GamepadButton) is true if any controller has the button down, and getStick(GamepadStick) and getTrigger(GamepadTrigger) read the first connected controller.
Sticks are a Vector2 with x from \u22121 (left) to 1 (right) and y from \u22121 (down) to 1 (up), as on the stage; near the middle they report (0, 0). Triggers go from 0 (not pressed) to 1 (fully pressed). Buttons are in Xbox positions; see GamepadButton for the PlayStation equivalents. Controllers connect and disconnect while the game runs; to react to that and to button presses, implement GamepadListener on the stage or a sprite.
Before a window exists or while no controller is connected, queries return false,
zero or (0, 0), so a game can ask without checking first.
Examples
File /src/examples/java/reference//GamepadExample.java is missing.