Description
Changelog
Reviews (0)
Features
AdvancedTimer
The AdvancedTimer node expands the Timer class by providing a wider set of functionalities.
Outside of using it to start a predetermined countdown timer, this node also provides a random timer of equal distribution and weighted distribution. The random times can be further tweaked by applying rounding rules, or forcing a specific seed for reliable timeouts.
Methods
| Method | Parameters | Return Type | Description |
|---|---|---|---|
| start_random | min_time: float = -1.0 max_time: float = -1.0 |
float | Starts a timer of equal distribution between min_time and max_time and returns the picked time. If no arguments are provided, then min_wait_time and max_wait_time are used instead. |
| start_weighted | times: PackedFloat32Array = [] weights: PackedFloat32Array = [] |
float | Starts a timer of weighted distribution from times and returns the picked time. If no arguments are provided, then weighted_times is used instead. |
Signals
| Signal | Parameters | Description |
|---|---|---|
| timer_started | time: float | Emitted when the timer started, with time in seconds until timeout is emitted. |
Properties
| Property | Type | Description |
|---|---|---|
| min_wait_time | float | Minimum time required for the timer to end. |
| max_wait_time | float | Maximum time required for the timer to end. |
| rounded | bool | If true, applies rounding to the random time. |
| rounding_type | Rounding | How rounding should be applied. |
| clamped | bool | Enforces rounding to be clamped between min_wait_time and max_wait_time. |
| step_size | float | The step size of the rounding. |
| weighted_times | WeightedTimeTable | A custom resource containing time/weight pairs. |
| time_weights | Dictionary[float, float] | Read-only shortcut to WeightedTimeTable. |
| static_randomization | bool | A shared RandomNumberGenerator used by all AdvancedTimer nodes. |
| seed | Variant | The seed to use for randomly generated numbers. |
Custom Data Types
| Data Type | Type | Description |
|---|---|---|
| Rounding | Enum | Elements that dictate how rounding gets applied.
|
WeightedTimeTable
A Resource that's pairing timer durations with selection weights.
Methods
| Method | Parameters | Return Type | Description |
|---|---|---|---|
| add_time | time: float weight: float |
void | Add an entry to time_weights with limit checking. |
| has_time | time: float | bool | Returns true if time is found in time_weights. |
| remove_time | time: float | bool | Remove entry time from time_weights. Returns true if time is successfully removed. |
| get_times | N/A | PackedFloat32Array | Returns all keys of time_weights. |
| get_weights | N/A | PackedFloat32Array | Returns all values of time_weights. |
Properties
| Property | Type | Description |
|---|---|---|
| time_weights | Dictionary[float, float] | The time/weight pairs, where the key is the duration in seconds and the corresponding value its weight. |
Changelog for version 2.3.2
2026-09-25 12:44:55
No changelog provided for this version.