MoveDirectionalEffect ​
Inherits: CompositeEffect < Effect < DatabaseResource < Resource
Inherited by: AcceleratedMoveEffect, ConstantMoveEffect, DashEffect, ImpulseEffect, PullEffect, PushEffect
MoveDirectionalEffect - Base class for all directional movement effects Inherits from CompositeEffect to support child effects on collision and normal application
Properties ​
DirectionType | direction_type | DirectionType.FORWARD |
bool | gravity_affected | true |
ChildEffectTiming | child_effects_timing | ChildEffectTiming.ON_COLLISION |
bool | stop_on_collision | true |
float | bounce_factor | 0.0 |
Methods ​
void | process_before_start( effect_instance: EffectInstance ) |
void | specific_effect_logic( effect_instance: EffectInstance ) |
void | apply_movement( _effect_instance: EffectInstance, _entity: Entity, _direction: Vector3 ) |
void | on_movement_collision( effect_instance: EffectInstance, collision: KinematicCollision3D ) |
void | handle_movement_collision( effect_instance: EffectInstance, collision: KinematicCollision3D ) |
void | on_movement_timer_finished( effect_instance: EffectInstance ) |
void | start_movement_timer( effect_instance: EffectInstance, duration_time: float, timer_name: String = "Movement_Timer" ) |
void | on_apply_finished( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
bool | is_one_off_application() |
Enumerations ​
enum DirectionType ​
The options of direction type: forward, backward, left, right, up, down, momentum.
- FORWARD =
0 - BACKWARD =
1 - LEFT =
2 - RIGHT =
3 - UP =
4 - DOWN =
5 - MOMENTUM =
6- Uses entity's current movement velocity direction (falls back to forward if stationary)
enum ChildEffectTiming ​
The options of child effect timing: none, on collision, on end.
- NONE =
0 - ON_COLLISION =
1 - ON_END =
2
Property descriptions ​
Direction Settings
DirectionType direction_type = DirectionType.FORWARD ​
Direction relative to entity's facing direction
bool gravity_affected = true ​
Whether movement should be affected by gravity (ignored for instant strategies)
Child Effects
ChildEffectTiming child_effects_timing = ChildEffectTiming.ON_COLLISION ​
When to apply child effects during movement
Collision Settings
bool stop_on_collision = true ​
Whether to stop movement when hitting obstacles
float bounce_factor = 0.0 ​
Bounce strength on collision (0.0 = no bounce, 1.0 = full bounce)
Method descriptions ​
void process_before_start( effect_instance: EffectInstance ) ​
Override the duration setup — movement effects own their lifecycle via movement timers. Set duration to permanent (0.0) so start_effect() won't create competing duration timers. Child classes that need immediate mode (instant dash, etc.) override this themselves.
void specific_effect_logic( effect_instance: EffectInstance ) ​
Override CompositeEffect to handle movement + child effects
void apply_movement( _effect_instance: EffectInstance, _entity: Entity, _direction: Vector3 ) ​
Virtual method for child classes to implement their movement logic
void on_movement_collision( effect_instance: EffectInstance, collision: KinematicCollision3D ) ​
Handle collision during movement (called by MovementStateComponent)
void handle_movement_collision( effect_instance: EffectInstance, collision: KinematicCollision3D ) ​
Virtual method for child classes to handle movement-specific collision logic
void on_movement_timer_finished( effect_instance: EffectInstance ) ​
Timer callback from EffectInstance - child classes can override
void start_movement_timer( effect_instance: EffectInstance, duration_time: float, timer_name: String = "Movement_Timer" ) ​
Starts the timer that ends the movement after some seconds.
void on_apply_finished( effect_instance: EffectInstance ) ​
Called when the effect ends: takes back what it did.
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.
bool is_one_off_application() ​
What this effect does it does once, when it is applied: a loaded save does not do it again