Skip to content

Spell Field Anchors

JohnSmith474 edited this page Sep 21, 2026 · 1 revision

The SpellFieldAnchorEntity is the invisible backbone of all lingering, cyclical, or delayed Spell Field operations.

Standard spell fields evaluate instantly on the exact tick they are triggered. If you need to create a lingering Area of Effect (such as a persistent healing aura, a pulsing poison cloud, or a slow-pulling black hole), you must encapsulate your spell_field component within a summon_spell_field_anchor effect.

When executed, this un-targetable, physics-immune entity is spawned into the world to manage your nested spell field over time.

Anchor Lifecycle Mechanics

An anchor operates on a precise temporal cycle, defined by the parameters passed into the summon_spell_field_anchor effect payload:

  • duration (Life Time): The total amount of time (in ticks) the anchor will exist in the world before automatically despawning.
  • activation_delay: An initial grace period (in ticks) after spawning before the anchor evaluates its spell field for the first time.
  • tick_rate: The frequency (in ticks) at which the nested spell field is evaluated during an active phase. For example, a tick_rate of 20 will pulse the effect once every second.
  • active_phase & rest_phase: These parameters define an oscillation cycle. The anchor will evaluate the spell field according to its tick_rate during the Active Phase, then completely pause during the Rest Phase.
    • If active_phase is omitted or set to 0, the anchor remains active for its entire lifespan.

This cyclic phase system allows for complex temporal behaviors. For example, you can create a magical trap that arms itself after 2 seconds (activation_delay), pulses damage rapidly for 3 seconds (active_phase), goes dormant to "recharge" for 5 seconds (rest_phase), and then repeats until its total duration expires.

Visuals

While anchors are inherently invisible, you can attach rendering logic to them. See the Custom Anchor Rendering guide in the Advanced Implementations chapter to learn how to bind 2D sprites and custom 3D models to your anchors.

Clone this wiki locally