Input actions
Gives the game named input actions that work on keyboard, gamepad and touch: movement axes, sprint, jump, interact and enter or exit, with per-project overrides of any kit's actions.
Input actions (input.actions) #
What it is for #
Gives the game named input actions that work on keyboard, gamepad and touch: movement axes, sprint, jump, interact and enter or exit, with per-project overrides of any kit's actions.
It needs game.engine; installing it brings them in.
Turn it on #
Install the kit in a project, then change a setting (the values shown are its defaults):
gripforge_gamekit_install { project_id: "gkp_…", id: "input.actions" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "input.actions",
config: { "eventActions": null, "gamepad": true } }
First example #
The kit has no dedicated test yet; this installs it and sets two of its settings to their defaults.
gripforge_gamekit_install { project_id: "gkp_…", id: "input.actions" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "input.actions",
config: { "eventActions": null, "gamepad": true } }
Settings and defaults #
Descriptions come from the kit manifest and stay in English.
| Setting | Type | Default | Range or values | Meaning |
|---|---|---|---|---|
eventActions | array | — | Rust KitHost only: additional existing enabled button actions whose press/release edges emit input.action. | |
gamepad | boolean | true | Read the first connected gamepad. | |
deadzone | number | 0.15 | 0–0.5 | Stick deadzone. |
overrides | array | [] | Replace the default keys of an action — the action of ANY installed kit (fire, moba.ability_q, vehicle.boost…), not only the ones… | |
scheme | string | "" | The control scheme the project started from (fps, third_person, moba_click, top_down, platformer, fighting, vehicle, rts,… |
Services, events, variables #
- Service
input.actions: pressed / justPressed / axis by action name, stick(action) for the 2D stick actions, capture per kit; labelFor(action) / promptFor(action, text): the on-screen key of an action from its effective binding (project, then player remapping) and the last device used — the only way a kit shows a key. - Events emitted:
input.action(action,name,phase,pressed) — Edge of a button action (axes are polled, not emitted).input.device(device) — The player switched between keyboard / mouse, gamepad and the on-screen controls (touch): on-screen prompts redraw their keys.
- Input actions:
move_x,move_y,sprint,jump,interact,enter_exit
Hooks and modding #
- Moddable settings:
gamepad,deadzone
Engines #
Declared targets: web, godot, unity, unreal, rust. gripforge kit api input.actions lists the exact settings and services of your version.
Versions #
Kit version 1.10.0.