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 ​
TriggerType | trigger_type | TriggerType.COLLISION |
float | arrival_threshold | 1.0 |
bool | use_curved_movement | false |
CurveType | curve_type | CurveType.STRAIGHT |
float | curve_amplitude | 2.0 |
float | curve_frequency | 1.0 |
ParametricCurvedMovement.CurveRotationMode | curve_rotation_mode | ParametricCurvedMovement.CurveRotationMode.RANDOM_RANGE |
float | fixed_curve_rotation | 0.0 |
float | random_rotation_range | 90.0 |
CollisionLayerUtility.HitMode | hit_mode | CollisionLayerUtility.HitMode.TARGET_ONLY |
int | pierce_count | 0 |
bool | stop_on_world_hit | true |
bool | stop_on_target_hit | true |
bool | track_moving_targets | true |
float | detonation_timer | 3.0 |
bool | trigger_on_expire | true |
bool | trigger_on_cancelled | false |
bool | also_trigger_on_collision_timer | false |
Methods ​
String | get_effect_description() |
String | get_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.