Skip to content

VFXTransformation ​

Inherits: RefCounted

VFX Transformation - Handles temporary visual transformations for entities Supports scaling, polymorph, and weapon swapping effects

Variables ​

Entity # The entity this transformation is applied totarget_entity
VFXSelectionTransformationtransformation_selection
Timereffect_timer
boolis_activefalse
boolis_finishedfalse
TransformationTypetransformation_typeTransformationType.SCALE
Vector3original_scale
PackedSceneoriginal_skeleton_scene
Dictionaryoriginal_weapon_meshes{}
Tweenblend_tween

Methods ​

voidapply_to_entity( entity: Entity, selection: VFXSelectionTransformation, timer: Timer = null )
voidrestore_transformations()
voidextend_duration( additional_time: float )
floatget_remaining_time()
boolis_effect_active()
voidcleanup()
Dictionaryget_effect_info()
boolconflicts_with( other: VFXTransformation )

Enumerations ​

enum TransformationType ​

The options of transformation type: scale, polymorph, weapon swap.

  • SCALE = 0
  • POLYMORPH = 1

Variable descriptions ​

Entity # The entity this transformation is applied to target_entity ​

========== CORE PROPERTIES ==========

VFXSelectionTransformation transformation_selection ​

The selection config that created this

Timer effect_timer ​

Timer controlling the effect duration

bool is_active = false ​

========== STATE TRACKING ==========

bool is_finished = false ​

True when the transformation is done.

TransformationType transformation_type = TransformationType.SCALE ​

Which change it is (scale, polymorph, weapon swap).

Vector3 original_scale ​

========== ORIGINAL STATE BACKUP ==========

PackedScene original_skeleton_scene ​

The model the entity had before the change.

Dictionary original_weapon_meshes = ​

slot_name -> original_mesh

Tween blend_tween ​

The tween of the change.

Method descriptions ​

void apply_to_entity( entity: Entity, selection: VFXSelectionTransformation, timer: Timer = null ) ​

Apply transformation effect to an entity

void restore_transformations() ​

Restore all transformations to original state

void extend_duration( additional_time: float ) ​

Extend the effect duration

float get_remaining_time() ​

Get remaining effect time

bool is_effect_active() ​

Check if effect is still active

void cleanup() ​

Manual cleanup (called when effect should end early)

Dictionary get_effect_info() ​

Get effect info for debugging

bool conflicts_with( other: VFXTransformation ) ​

Check if this effect conflicts with another transformation