xyzed

zombie_coordinates_spawn_test.lua — Zombie module

What it does

Spawns a given number of zombies at explicit world coordinates (x, y, z). If no coordinates are supplied the zombies are instead placed at a random position within a 15-unit radius of the player. Each spawned zombie is placed in the on-ground state immediately after creation, useful for testing coordinate-based spawning logic.

Trigger type

xyzed

Parameters

ParameterTypeDefaultValid ValuesDescription
zombieCountnumberrequiredAny positive integerNumber of zombies to spawn. The event will abort if this is missing.
xnumbernoneAny valid world X coordinateWorld X position. If omitted, a random position near the player is used.
ynumbernoneAny valid world Y coordinateWorld Y position. If omitted, a random position near the player is used.
znumberPlayer's Z / 0Any valid world Z levelWorld Z (floor) level. Falls back to player Z when coordinates are auto-generated.

Examples

Spawn 5 zombies near the player (random position within 15 units)
{ type="xyzed", zombieCount=5 }
Spawn 10 zombies at explicit world coordinates
{ type="xyzed", zombieCount=10, x=11800, y=7200, z=0 }
Spawn 1 zombie at a specific upper-floor location
{ type="xyzed", zombieCount=1, x=11850, y=7250, z=1 }