Skip to content

ChargeToPointEffect ​

Inherits: MoveToPointEffect < CompositeEffect < Effect < DatabaseResource < Resource

ChargeToPointEffect: Straight-line ground charge to a target position or entity Self-contained movement — drives the entity each physics tick via move_and_slide() for proper collision detection along the charge path. Duration is derived from distance/speed so the charge feels consistent regardless of range.

Description ​

Perfect for warrior charges, bull rushes, tackles, and gap closers that need to collide with entities along the path.

Properties ​

floatcharge_speed20.0
boolstop_on_collisiontrue
floatbounce_factor0.0
ChildEffectTargetchild_effect_targetChildEffectTarget.ORIGINAL_TARGET

Methods ​

voidapply_movement_to_point( effect_instance: EffectInstance, entity: Entity, target_position: Vector3 )
voidon_apply_finished( effect_instance: EffectInstance )
Stringget_effect_description()
Stringget_editor_description()

Enumerations ​

enum ChildEffectTarget ​

The options of child effect target: original target, collision target.

  • ORIGINAL_TARGET = 0 - Apply child effects to the entity/point this effect targets
  • COLLISION_TARGET = 1 - Apply child effects to entities collided with during charge

Property descriptions ​

Charge Settings

float charge_speed = 20.0 ​

Movement speed during charge (units per second)

bool stop_on_collision = true ​

Whether movement should stop when colliding with an obstacle (wall/entity)

float bounce_factor = 0.0 ​

Bounce factor on collision (0.0 = no bounce, only used if stop_on_collision is false)

Child Effects

ChildEffectTarget child_effect_target = ChildEffectTarget.ORIGINAL_TARGET ​

What receives child effects — the original target on arrival, or entities hit during charge

Method descriptions ​

void apply_movement_to_point( effect_instance: EffectInstance, entity: Entity, target_position: Vector3 ) ​

Moves the entity to the target point.

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.