knockDown
zombie_knockdown.lua — Zombie module
What it does
Iterates over all zombies in the current cell and knocks down every zombie within a specified radius of the player. Uses zombie:setKnockedDown(true) on each qualifying zombie, causing them to fall to the ground immediately.
Trigger type
knockDown
Parameters
| Parameter | Type | Default | Valid Values | Description |
|---|---|---|---|---|
radius | number | 20 | Any positive number | Distance in world units from the player within which zombies will be knocked down. |
Examples
Knock down all zombies within 20 units (default)
{ type="knockDown" }
Wide-area knockdown across a large radius
{ type="knockDown", radius=50 }
Only knock down zombies right next to the player
{ type="knockDown", radius=5 }