Skip to content

ASDelivery

PT | EN
Inherits: Node

Reactive effect delivery node for projectiles and payloads.

Description

[ASDelivery] is a specialized node designed to carry and deliver [ASPackage]s to [ASComponent] targets. Unlike [ASComponent], which acts as a full ability system hub for an actor, [ASDelivery] is a lightweight utility that can be attached to any node (like a projectile’s Area2D) to inject effects upon impact.

Properties

TypeNameDefault
boolauto_connectfalse
If true, attempts to connect automatically to [Area2D] or [Area3D] signals in the parent node.
boolis_activefalse
Current activation state.
floatlevel1.0
The magnitude or strength level of the delivery. This gets injected into all effects spawned by the delivery.
floatlife_span0.0
Maximum duration the delivery stays active (0 = infinite).
boolone_shotfalse
If true, the delivery deactivates automatically after the first successful delivery.
ASPackagepackage
The [ASPackage] payload containing effects and cues.
ASComponentsource_component
The [ASComponent] that initiated this delivery (e.g., the original attacker).
StringName[]target_groups[]
List of groups that targets must belong to for delivery to occur.

Methods

ReturnName
voidactivate( duration: float = -1.0)
Activates the delivery. If [param duration] is positive, it overrides [member life_span].
boolcan_deliver_to( target: Node) const
Checks if the delivery can reach the specified target (checks groups and validity).
voiddeactivate( )
Deactivates the delivery.
voiddeliver( target: Node)
Delivers the payload of an [ASPackage] to the target component. Automatically dispatches ASEventTags defined in the package upon successful delivery.
boolis_delivery_valid( ) const
Returns true if the delivery is active and hasn’t expired.

Signals

  • delivered( target: Object)

    Emitted when a package is successfully delivered to a target.

  • expired( )

    Emitted when the life_span timer reaches zero.