GDScript Signals

An asset by ava
The page banner background of a mountain and forest
GDScript Signals hero image

Quick Information

0 ratings
GDScript Signals icon image
ava
GDScript Signals

Provides a GDScript helper class called "Signals" which exposes static functions for interacting with collections of signals, like Signals.all(), similar to Promise.all() in JavaScript.

Supported Engine Version
4.0
Version String
1.0.2
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

GDScript Signals

A Godot 4.x plugin which provides a Signals class which exposes static functions for interacting with lists of Signals, like Promise.all() in JavaScript.

Usage

After importing and enabling the plugin, use one of the static methods attached to Signals detailed below.

all(signals_list)->Array

Given a list of Signals, waits until all of the signals complete, then returns an array of the results from the signals, matching the order the signals were passed in.

Example:

var results := await Signals.all([
    weapon.target_was_hit,
    weapon.animation_complete
])

any(signals_list)

Given a list of Signals, waits until at least one of those signals completes, returning the result of that completed signal.

Example:

var result = await Signals.any([
    target.damage_taken,
    bullet.expired
])

Contributing

Feel free to send pull requests or issues. This repository is a complete Godot 4.x project, so it can be imported locally for development.

Note: This repo comes with Gut unit tests, please make sure to add new test coverage and check existing tests when adding or changing code.

Provides a GDScript helper class called "Signals" which exposes static functions for interacting with collections of signals, like Signals.all(), similar to Promise.all() in JavaScript.

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
GDScript Signals icon image
ava
GDScript Signals

Provides a GDScript helper class called "Signals" which exposes static functions for interacting with collections of signals, like Signals.all(), similar to Promise.all() in JavaScript.

Supported Engine Version
4.0
Version String
1.0.2
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