Lavaarena Portal
Based on game build 714014 | Last updated: 2026-03-05
Overview
This file defines three prefabs used in the Lava Arena event: the main portal structure (lavaarena_portal), its unopened keyhole variant (lavaarena_keyhole), and a visual effect for when the portal is active (lavaarena_portal_activefx). These prefabs are static renderable entities with appropriate animation states and layering, created only on the client (except for non-mastersim entities, which return early to avoid server-side overhead). The main portal includes an optional drop-shadow entity and delegates master-side initialization via event_server_data.
Usage example
-- Example: Spawning the portal prefab
local portal = SpawnPrefab("lavaarena_portal")
portal.Transform:SetPosition(x, y, z)
-- Example: Spawning the keyhole (pre-activation state)
local keyhole = SpawnPrefab("lavaarena_keyhole")
keyhole.Transform:SetPosition(x, y, z)
Dependencies & tags
Components used: None (uses only core engine services: Transform, AnimState, SoundEmitter, Network).
Tags:
lavaarena_portal: AddsDECOR,NOCLICKto the shadow entity.lavaarena_keyhole: Addsinspectablecomponent (viainst:AddComponent("inspectable")).lavaarena_portal_activefx,lavaarena_portal: Neither adds tags beyond engine defaults.
Properties
No public properties.
Main functions
CreateDropShadow(parent)
- Description: Creates a non-networked, non-persistent shadow entity attached to the parent portal. Renders a predefined shadow symbol beneath the portal on the background layer.
- Parameters:
parent(Entity) — The entity instance to which the shadow is attached. - Returns: Entity — The newly created shadow entity.
- Error states: None identified.
fn()
- Description: Constructor for the main
lavaarena_portalprefab. Sets up visual state, orientation, and layering. Skips full initialization on dedicated servers and non-mastersim clients. On mastersim, callsmaster_postinitviaevent_server_data. - Parameters: None (used internally by
Prefabconstructor). - Returns: Entity — The initialized portal instance.
keyhole_fn()
- Description: Constructor for the
lavaarena_keyholeprefab. Sets up the keyhole visual, hides the "key" symbol, applies slight scale, and marks as non-persistent. - Parameters: None (used internally by
Prefabconstructor). - Returns: Entity — The initialized keyhole instance.
activefx_fn()
- Description: Constructor for the
lavaarena_portal_activefxprefab. Plays a pre-animation (portal_pre) on instantiation, then pushes theportal_loopanimation on mastersim. Used as a transient visual effect during portal activation. - Parameters: None (used internally by
Prefabconstructor). - Returns: Entity — The initialized effect entity.
Events & listeners
None.