Skip to content

SwapEffect ​

Inherits: MoveToPointEffect < CompositeEffect < Effect < DatabaseResource < Resource

SwapEffect: Two entities instantly swap positions The originator teleports to the target's position and vice versa. Child effects can be applied to either or both entities on arrival.

Description ​

Perfect for support life-saving swaps, trickster position exchanges, chaos mage scrambles, and tactical repositioning abilities.

Properties ​

SwapChildTargetchild_effect_targetSwapChildTarget.BOTH
boolsnap_to_groundtrue

Methods ​

voidprocess_before_start( effect_instance: EffectInstance )
voidapply_movement_to_point( effect_instance: EffectInstance, entity: Entity, _target_position: Vector3 )
Stringget_effect_description()
Stringget_editor_description()

Enumerations ​

enum SwapChildTarget ​

The options of swap child target: both, target only, self only.

  • BOTH = 0 - Apply child effects to both originator and target
  • TARGET_ONLY = 1 - Apply child effects only to the target
  • SELF_ONLY = 2 - Apply child effects only to the originator

Property descriptions ​

Swap Settings

SwapChildTarget child_effect_target = SwapChildTarget.BOTH ​

Who receives child effects after the swap

bool snap_to_ground = true ​

Whether to find valid ground positions at each swap destination

Method descriptions ​

void process_before_start( effect_instance: EffectInstance ) ​

Swap is always instant

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

Moves the entity to the target point.

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.