Thunder Close
Based on game build 714014 | Last updated: 2026-03-07
Overview
thunder_close is a client-side FX prefab that creates a localized thunder sound effect with positional audio and triggers a screen flash. It is instantiated locally on the client (excluding dedicated servers) and does not persist in the world. The prefab uses a single-frame delayed task to ensure safe cleanup and randomly generates a sound-emission angle and radius for spatial distribution.
Usage example
-- This prefab is automatically spawned by the game engine (e.g., during thunderstorm events).
-- It is not intended for direct manual instantiation by modders.
-- However, if needed:
local inst = Prefab("thunder_close", fn)()
Dependencies & tags
Components used: None identified.
Tags: Adds FX via inst:AddTag("FX").
Properties
No public properties.
Main functions
This prefab does not expose any public functions to modders. All behavior is encapsulated within internal helper functions.
Events & listeners
- Listens to:
randdirty— triggersOnRandDirty, which schedules a sound emitter entity spawn on the client. - Pushes:
screenflashwith intensity.5viaTheWorld:PushEvent("screenflash", .5)— triggers a visual flash effect.