Skip to content

ChainProjectileEffect ​

Inherits: BaseProjectileEffect < CompositeEffect < Effect < DatabaseResource < Resource

Chain projectile effect - bounces between multiple targets with selectable trigger Can use collision, destination, or timer triggers for different behaviors

Properties ​

TriggerTypetrigger_typeTriggerType.DESTINATION
intmax_chains3
floatchain_range5.0
ChainEffect.ChainTargetTypechain_target_filterChainEffect.ChainTargetType.ENAMY
boolallow_repeat_targetsfalse
floatarrival_threshold1.0
CollisionLayerUtility.HitModehit_modeCollisionLayerUtility.HitMode.ENEMY_ENTITIES
intpierce_count0
boolstop_on_world_hittrue
boolstop_on_target_hitfalse
floatdetonation_timer3.0
booltrigger_on_expiretrue
booltrigger_on_cancelledfalse
boolalso_trigger_on_collision_timerfalse

Methods ​

Stringget_effect_description()
Stringget_editor_description()

Property descriptions ​

Trigger Settings

TriggerType trigger_type = TriggerType.DESTINATION ​

Default to destination for chaining

Chain Settings

int max_chains = 3 ​

Maximum number of chain bounces

float chain_range = 5.0 ​

Range to find next chain target

ChainEffect.ChainTargetType chain_target_filter = ChainEffect.ChainTargetType.ENAMY ​

Which targets the projectile bounces to.

bool allow_repeat_targets = false ​

Allow hitting same target multiple times

float arrival_threshold = 1.0 ​

Distance to consider target reached

Collision Settings

CollisionLayerUtility.HitMode hit_mode = CollisionLayerUtility.HitMode.ENEMY_ENTITIES ​

What the projectile hits on its way.

int pierce_count = 0 ​

How many targets the projectile passes through.

bool stop_on_world_hit = true ​

True when the projectile stops when it hits the world.

bool stop_on_target_hit = false ​

True when the projectile stops when it hits a target.

Timer Settings

float detonation_timer = 3.0 ​

How many seconds the projectile lives before it detonates.

bool trigger_on_expire = true ​

True when the effects apply when the projectile runs out of time.

bool trigger_on_cancelled = false ​

True when the effects apply when the projectile is cancelled.

bool also_trigger_on_collision_timer = false ​

True when a collision also applies the effects when the timer trigger is chosen.

Method descriptions ​

String get_effect_description() ​

The text of the effect for tooltips, with its values filled in.

String get_editor_description() ​

A short text for the effect editor that says what the effect does.