ProjectileTrigger ​
Inherits: RefCounted
Inherited by: CollisionProjectileTrigger, DestinationProjectileTrigger, TimerProjectileTrigger
Base class for all projectile trigger strategies Updated to handle Entity and InteractableObject targets
Variables ​
EffectInstance | effect_instance | |
BaseProjectileInstance | projectile | |
bool | is_active | false |
bool | is_depleted | false |
Methods ​
void | initialize( new_effect_instance: EffectInstance ) |
bool | should_trigger_on_target( target: Variant ) |
bool | should_trigger_on_world() |
bool | should_trigger_on_destination() |
bool | on_target_hit( target: Variant ) |
bool | on_world_hit() |
bool | on_destination_reached() |
void | deplete_trigger() |
void | cleanup() |
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