Skip to content

ASEffectSpec

PT | EN
Inherits: RefCounted

Runtime instance of an effect.

Description

[ASEffectSpec] represents an active effect. It stores the remaining duration and calculated magnitudes.

Properties

TypeNameDefault
Varianthit_positionnull
Impact position (Vector2 or Vector3) usually associated with a collision query.
Objecttarget_node
The target Object/Node that the effect is applied to or interacting with.

Methods

ReturnName
floatget_duration_remaining( ) const
Returns time left before effect ends.
ASEffectget_effect( ) const
Returns the effect resource definition.
floatget_level( ) const
Returns the power level of the effect instance.
floatget_magnitude( name: StringName) const
Returns the calculated modifier value for an attribute.
floatget_period_timer( ) const
Returns the time remaining until the next periodic tick.
floatget_source_attribute_value( attribute: StringName) const
Returns the value of an attribute on the source component.
ASComponentget_source_component( ) const
Returns the ASC that applied this effect.
intget_stack_count( ) const
Returns the current number of stacks for this effect.
floatget_target_attribute_value( attribute: StringName) const
Returns the value of an attribute on the target component.
ASComponentget_target_component( ) const
Returns the destination component where the effect is applied.
floatget_total_duration( ) const
Returns the initial calculated duration.
voidinit( effect: ASEffect, level: float = 1.0)
Initializes the effect specification with a definition and level.
voidset_duration_remaining( value: float)
Sets the remaining time for the effect.
voidset_level( level: float)
Sets the power level of this instance.
voidset_magnitude( name: StringName, value: float)
Manually sets the calculated magnitude for an attribute.
voidset_period_timer( timer: float)
Sets the internal timer for the next periodic tick.
voidset_stack_count( count: int)
Sets the number of stacks.
voidset_total_duration( value: float)
Sets the total duration.