Skip to content

ProjectileTrigger ​

Inherits: RefCounted

Inherited by: CollisionProjectileTrigger, DestinationProjectileTrigger, TimerProjectileTrigger

Base class for all projectile trigger strategies Updated to handle Entity and InteractableObject targets

Variables ​

EffectInstanceeffect_instance
BaseProjectileInstanceprojectile
boolis_activefalse
boolis_depletedfalse

Methods ​

voidinitialize( new_effect_instance: EffectInstance )
boolshould_trigger_on_target( target: Variant )
boolshould_trigger_on_world()
boolshould_trigger_on_destination()
boolon_target_hit( target: Variant )
boolon_world_hit()
boolon_destination_reached()
voiddeplete_trigger()
voidcleanup()

Variable descriptions ​

EffectInstance effect_instance ​

Reference to the effect instance that created the projectile

BaseProjectileInstance projectile ​

Reference to the projectile instance

bool is_active = false ​

Whether the trigger is currently active

bool is_depleted = false ​

Whether the trigger has been used up

Method descriptions ​

void initialize( new_effect_instance: EffectInstance ) ​

Initialize the trigger strategy

bool should_trigger_on_target( target: Variant ) ​

Check if trigger should activate on target collision (Entity or InteractableObject)

bool should_trigger_on_world() ​

Check if trigger should activate on world collision

bool should_trigger_on_destination() ​

Check if trigger should activate on reaching destination

bool on_target_hit( target: Variant ) ​

Handle target hit trigger (Entity or InteractableObject)

bool on_world_hit() ​

Handle world collision trigger

bool on_destination_reached() ​

Handle destination reached trigger

void deplete_trigger() ​

Mark trigger as depleted (can't trigger anymore)

void cleanup() ​

Clean up trigger strategy