Alterguardian Summon Fx
Based on game build 714014 | Last updated: 2026-03-04
Overview
alterguardian_summon_fx is a client-side prefab responsible for rendering the summoning visual sequence for the Alterguardian boss. It manages a multi-phase animation (summon_pre → summon_loop → summon_pst) and dynamically adjusts light intensity, radius, and falloff using frame-specific modulation tables. On non-dedicated clients, it also spawns and synchronizes a separate "back effect" entity (alterguardian_summon_backfx) that plays in parallel. The component is non-persistent and self-deleting after the full animation completes.
Usage example
This prefab is created internally by the game engine via Prefab("alterguardian_summon_fx", fn, assets) and is not typically added manually by modders. A typical usage pattern would be:
-- Not intended for direct instantiation by modders.
-- The game spawns this prefab as needed during Alterguardian summoning.
-- Example (internal use only):
local fx = SpawnPrefab("alterguardian_summon_fx")
fx.Transform:SetPosition(pos)
Dependencies & tags
Components used: transform, animstate, light, network
Tags: Adds FX; self-removes on animation completion.
Properties
No public properties.
Main functions
CLIENT_MakeBackFX()
- Description: Creates and returns a standalone "back" FX entity (
alterguardian_summon_backfx) used for layered visuals behind the main FX. It playssummon_back_prefollowed by a loopingsummon_back_loop. - Parameters: None.
- Returns:
inst(Entity) — the created back FX entity, ornilif creation fails.
set_lightvalues(inst, val)
- Description: Updates the entity’s light properties (intensity, radius, falloff) and animation light override based on a scalar
val. - Parameters:
val(number) — a modulation factor in(0, 1]used to scale light parameters.
- Returns: Nothing.
periodic_light_update(inst)
- Description: Called periodically (every
FRAMES) to update light values based on the current animation frame. It selects the appropriate modulation table (pre-loop-post) and applies the correspondingval. - Parameters:
inst(Entity) — the FX instance.
- Returns: Nothing.
on_endloop(inst)
- Description: Triggered by the
endloopevent when the loop animation finishes. Plays the post-animation (summon_pst), signals completion via_end_loopevent, and registers cleanup onanimover. - Parameters:
inst(Entity) — the FX instance.
- Returns: Nothing.
pre_over(inst)
- Description: Marks the pre-animation phase as finished by setting
_pre_finished = true, which influences light modulation table selection. - Parameters: None.
- Returns: Nothing.
CLIENT_end_backfx(inst)
- Description: Ends the back FX sequence by playing
summon_back_pstand scheduling removal after animation ends. - Parameters:
inst(Entity) — the main FX instance (used to access_back_fx).
- Returns: Nothing.
CLIENT_start_back_fx(inst)
- Description: Spawns the back FX entity at the same position as
inst, and registers a listener to end the back FX when the main FX loops. - Parameters:
inst(Entity) — the main FX instance.
- Returns: Nothing.
Events & listeners
- Listens to:
endloop— triggerson_endloopwhen thesummon_loopanimation completes.animover— triggersRemoveto clean up the entity after animation finishes (set inon_endloop).alterguardian_summon_fx._end_loop— triggersCLIENT_end_backfxon the main entity (client-side only).
- Pushes:
alterguardian_summon_fx._end_loop— networked event fired viainst._end_loop:push()at loop completion.