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
| Parameter | Type | Default | Valid Values | Description |
|---|---|---|---|---|
zombieCount | number | required | Any positive integer | Number of zombies to spawn. The event will abort if this is missing. |
x | number | none | Any valid world X coordinate | World X position. If omitted, a random position near the player is used. |
y | number | none | Any valid world Y coordinate | World Y position. If omitted, a random position near the player is used. |
z | number | Player's Z / 0 | Any valid world Z level | World 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 }