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

ParameterTypeDefaultValid ValuesDescription
radiusnumber20Any positive numberDistance 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 }