Skip to content

InputAction

Not yet Class Other

Defines a gameplay action mechanic. These actions are then mapped to hardware inputs using InputBinding.

Not implemented yet

This class exists in the current Roblox API but is not implemented in Nova yet. Scripts that reference it will fail at runtime.

0 Nova members · 18 modern Roblox members not implemented yet

Description

InputAction defines a gameplay action mechanic such as "Jump," "Sprint," or "Shoot." These actions are then mapped to hardware inputs using InputBinding. An InputAction will check for its first ancestor type of InputContext and register itself to that context (if there is no ancestor context, it will be registered to a default context).

Inheritance

Object → Instance → InputAction

Properties

Member Signature Summary
BoolState BoolState: bool Non-scriptable read-only property useful for debugging Bool input actions.
Direction1DState Direction1DState: float Non-scriptable read-only property useful for debugging Direction1D input actions.
Direction2DState Direction2DState: Vector2 Non-scriptable read-only property useful for debugging Direction2D input actions.
Direction3DState Direction3DState: Vector3 Non-scriptable read-only property useful for debugging Direction3D input actions.
DisplayName DisplayName: string Localized display name for this action.
Enabled Enabled: bool Determines if the InputAction is enabled or not.
PreferredBinding PreferredBinding: InputBinding The InputBinding best matching the player's current input device.
Type Type: InputActionType Specifies what type of input value the action is expecting.
ViewportPositionState ViewportPositionState: Vector2 Non-scriptable read-only property useful for debugging ViewportPosition input actions.

Methods

Member Signature Summary
Fire InputAction:Fire(state: Variant): null Updates the InputAction to the given state and fires the appropriate signals.
GetInputBindings InputAction:GetInputBindings(): Instances —
GetPreferredBindingList InputAction:GetPreferredBindingList(count: int = 0): Instances —
GetState InputAction:GetState(): Variant Returns the current state of the InputAction.

Events

Member Signature Summary
InputBindingsChanged InputBindingsChanged() —
Pressed Pressed() Fires only when the InputAction.Type is set to Bool on a state transition from false to true.
Released Released() Fires only when the InputAction.Type is set to Bool on a state transition from true to false.
StateChanged StateChanged(value: Variant) Fires for all InputActionType types whenever the state changes, except if the state attempts to transition to the same state.

Roblox reference: InputAction

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.