zombierain

zombie_rain.lua — Zombie module

What it does

Spawns zombies one at a time at random positions around the player over a period of game ticks, creating a "raining zombies" effect. Each zombie is placed in a random initial state (knocked down, standing, or crawling), a sledgehammer sound plays at the spawn point, and optionally each zombie is registered to a named viewer with a floating chat label. A guard flag prevents re-triggering while a rain sequence is already active.

Trigger type

zombierain

Parameters

ParameterTypeDefaultValid ValuesDescription
numbernumber10Any positive integerTotal number of zombies to spawn during the rain sequence.
radiusnumber10Any positive numberMaximum distance from the player at which zombies can spawn.
intervalnumber60Any positive integer (ticks)Number of game ticks between each individual zombie spawn.
viewerstringnoneAny stringIf provided, each zombie is registered to this viewer name and receives a floating label.

Examples

Default: 10 zombies, one every 60 ticks, within 10 units
{ type="zombierain" }
Fast rain of 20 zombies tagged to a viewer
{ type="zombierain", number=20, radius=15, interval=30, viewer="Chaos_Fan" }
Slow dramatic rain with wide spread
{ type="zombierain", number=5, radius=25, interval=120 }