Deerclops Icespike Fx
Based on game build 714014 | Last updated: 2026-03-05
Overview
deerclops_icespike_fx is a reusable visual effect prefab used to represent ice spikes launched by Deerclops. It handles animation playback, sound emission, and scene lifecycle: after its animation completes, the entity is either returned to an owner's pool for reuse or destroyed if no pool exists. It is lightweight, non-interactive, and does not persist across sessions.
Usage example
-- Obtain an instance from Deerclops' ice spike pool
local fx = table.remove(deerclops.icespike_pool)
fx:SetFXOwner(deerclops)
fx.RestartFX(fx, false, 2) -- small spike, variation 2
Dependencies & tags
Components used: None identified
Tags: Adds FX, NOCLICK
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
owner | entity or nil | nil | Reference to the Deerclops entity that owns this FX instance for pooling purposes. |
Main functions
SetFXOwner(owner)
- Description: Assigns the owner entity (typically the Deerclops instance) for later pooling upon FX expiry.
- Parameters:
owner(entity) – the entity that spawned this FX and maintains theicespike_poolarray. - Returns: Nothing.
RestartFX(big, variation)
- Description: Restores the FX to the scene and plays a new animation based on size and variation.
- Parameters:
big(boolean) – iftrue, plays"spike_big"animation; otherwise"spike".variation(number ornil) – integer suffix for the animation (e.g.,2→"spike2"). Ifnil, a random value from1–4is used.
- Returns: Nothing.
Events & listeners
- Listens to:
animover– triggers cleanup logic viaOnAnimOver, either returning the entity to its owner's pool or removing it entirely. - Pushes: None identified