Skip to content

DirectProjectileEffect ​

Inherits: BaseProjectileEffect < CompositeEffect < Effect < DatabaseResource < Resource

Direct projectile effect - straight line movement with selectable trigger Can use collision, destination, or timer triggers for different behaviors

Properties ​

TriggerTypetrigger_typeTriggerType.COLLISION
floatarrival_threshold1.0
booluse_curved_movementfalse
CurveTypecurve_typeCurveType.STRAIGHT
floatcurve_amplitude2.0
floatcurve_frequency1.0
ParametricCurvedMovement.CurveRotationModecurve_rotation_modeParametricCurvedMovement.CurveRotationMode.RANDOM_RANGE
floatfixed_curve_rotation0.0
floatrandom_rotation_range90.0
CollisionLayerUtility.HitModehit_modeCollisionLayerUtility.HitMode.TARGET_ONLY
intpierce_count0
boolstop_on_world_hittrue
boolstop_on_target_hittrue
booltrack_moving_targetstrue
floatdetonation_timer3.0
booltrigger_on_expiretrue
booltrigger_on_cancelledfalse
boolalso_trigger_on_collision_timerfalse

Methods ​

Stringget_effect_description()
Stringget_editor_description()

Enumerations ​

enum CurveType ​

The options of curve type: straight, arc, sine wave, spiral, bezier.

  • STRAIGHT = 0
  • ARC = 1
  • SINE_WAVE = 2
  • SPIRAL = 3
  • BEZIER = 4

Property descriptions ​

Trigger Settings

TriggerType trigger_type = TriggerType.COLLISION ​

What makes the projectile apply its effects: a collision, reaching the destination, or a timer.

Movement Settings

float arrival_threshold = 1.0 ​

Distance to consider target reached

Curve Settings

bool use_curved_movement = false ​

Enable curved projectile path

CurveType curve_type = CurveType.STRAIGHT ​

Type of curve

float curve_amplitude = 2.0 ​

How pronounced the curve is

float curve_frequency = 1.0 ​

For wave patterns (sine/spiral)

Curve Rotation

ParametricCurvedMovement.CurveRotationMode curve_rotation_mode = ParametricCurvedMovement.CurveRotationMode.RANDOM_RANGE ​

How the curve of the path is rotated for each projectile.

float fixed_curve_rotation = 0.0 ​

Degrees from default UP position

float random_rotation_range = 90.0 ​

Degrees of random variation from default

Collision Settings

CollisionLayerUtility.HitMode hit_mode = CollisionLayerUtility.HitMode.TARGET_ONLY ​

What the projectile hits on its way.

int pierce_count = 0 ​

0 = stop on first, -1 = infinite, >0 = pierce X targets

bool stop_on_world_hit = true ​

True when the projectile stops when it hits the world.

bool stop_on_target_hit = true ​

True when the projectile stops when it hits a target.

Destination Settings

bool track_moving_targets = true ​

Update destination for moving Entity targets

Timer Settings

float detonation_timer = 3.0 ​

Time before trigger activates

bool trigger_on_expire = true ​

Trigger when timer expires

bool trigger_on_cancelled = false ​

Manual detonation when effect cancelled

bool also_trigger_on_collision_timer = false ​

Also trigger on collision for timer

Method descriptions ​

String get_effect_description() ​

Get effect description for tooltips

String get_editor_description() ​

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