Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Godot Timed Input

An asset by hatmix
The page banner background of a mountain and forest
Godot Timed Input hero image

Quick Information

0 ratings
Godot Timed Input icon image
hatmix
Godot Timed Input

Adds a node type that monitors an input action for long holds, short taps and multiple taps. Can emit signals or send InputEventActions. Which events are monitored and what is done in response are configurable. See https://hatmix.itch.io/godot-timed-input for a demo.

Supported Engine Version
4.2
Version String
v1.0.0
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

TimedInput for Godot

README TimedInput Icon

Adds a node type that monitors an input action for long holds, short taps and multiple taps. Can emit signals or send InputEventActions. Which events are monitored and what is done in response are configurable.

The included demo covers much of the functionality of the addon. Try out the demo at https://hatmix.itch.io/godot-timed-input

README Demo App Screenshot

TimedInput types

Tap
An action input pressed and released before too long (see Action Hold Delay).
Multitap
One or more taps quickly following an initial tap (see Action Multitap Timeout).
Hold
An action input continuously pressed for at least a minimum time.

Configuration options

Action
Name of an action from the input map to be timed
Action Hold Delay
How many seconds an action button/key must be held before it is a "hold" instead of a "tap"
Action Multitap Timeout
How many seconds after a tap can the next tap be part of a consecutive chain (multitap)
Emit Signals
Enable to emit signals for TimedInput types
Send Events
Enable to send events for TimedInput types
Process Tap, Process Multitap, Process Hold
Enable or disable each to react to or ignore the related TimedInput type
Emit Holding Signal
Enable to emit the holding signal with current total time held each physics frame, e.g. for easy progress bar updates.
Strength Scale
InputEventAction strength is used for the count of multitaps and duration of holds. Strength has a range of 0.0 to 1.0, so count and duration are multiplied by this scale value to get a valid strength. This is only needed in events as signals pass the actual values.

Signals

tapped (duration: float)
multitapped (count: int)
hold_started
holding (current_duration: float)
hold_finished(total_duration: float)

Events

When enabled, input actions will be added based on the action being monitored.

[action name]_tap
[action name]_multitap
[action name]_hold_started
[action name]_hold_finished

Note that events are experimental and more likely to receive breaking changes.

Motivation

This addon grew out of coding my entry for the 1-Button Jam, OBMG (One Button Mini-Golf).

Attribution

Adds a node type that monitors an input action for long holds, short taps and multiple taps. Can emit signals or send InputEventActions. Which events are monitored and what is done in response are configurable. See https://hatmix.itch.io/godot-timed-input for a demo.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Godot Timed Input icon image
hatmix
Godot Timed Input

Adds a node type that monitors an input action for long holds, short taps and multiple taps. Can emit signals or send InputEventActions. Which events are monitored and what is done in response are configurable. See https://hatmix.itch.io/godot-timed-input for a demo.

Supported Engine Version
4.2
Version String
v1.0.0
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers