Left 4 Dead 2/Scripting/Script Functions/ZSpawn: Difference between revisions
< Left 4 Dead 2 | Scripting | Script Functions
Jump to navigation
Jump to search
m (Nescius moved page Left 4 Dead 2/Script Functions/ZSpawn to Left 4 Dead 2/Scripting/Script Functions/ZSpawn: same as tf2) |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Dead end|date=January 2024}} | |||
== Function Description == | == Function Description == | ||
Line 5: | Line 6: | ||
Spawns a zombie. This is essentially the z_spawn console command, except (a) you pass a table and (b) no raycast, you give it the position vector. | Spawns a zombie. This is essentially the z_spawn console command, except (a) you pass a table and (b) no raycast, you give it the position vector. | ||
== Parameters == | == Parameters == | ||
Line 17: | Line 17: | ||
| Table used for spawn parameters. | | Table used for spawn parameters. | ||
|} | |} | ||
== Returns == | == Returns == | ||
''bool'' - Whether the zombie spawned successfully. | ''bool'' - Whether the zombie spawned successfully. | ||
{{warning|The function will fail to spawn the zombie while players are still loading if<code>pos</code>is not provided.|only=l4d2}} | |||
== Input Parameters == | == Input Parameters == |
Latest revision as of 14:02, 15 September 2024

This article has no
links to other VDC articles. Please help improve this article by adding links
that are relevant to the context within the existing text.
January 2024


January 2024
Function Description
bool ZSpawn(table spawnTable)
Spawns a zombie. This is essentially the z_spawn console command, except (a) you pass a table and (b) no raycast, you give it the position vector.
Parameters
Type | Name | Description |
---|---|---|
table | spawnTable | Table used for spawn parameters. |
Returns
bool - Whether the zombie spawned successfully.

pos
is not provided.Input Parameters
Passed to spawnTable to set up the spawn parameters.
Type | Name | Description |
---|---|---|
int | type | Zombie type enumeration. ZOMBIE_WITCH, etc - or the special ZSPAWN_MOB, or WITCHBRIDE, etc. |
Vector | pos | Vector position at which to spawn, optional (defaults to automatically spawn somewhere in the world). |
QAngle | ang | Angle for spawn, optional (defaults to 0,0,0). |
Zombie types
- ZOMBIE_SMOKER = 1
- ZOMBIE_BOOMER = 2
- ZOMBIE_HUNTER = 3
- ZOMBIE_SPITTER = 4
- ZOMBIE_JOCKEY = 5
- ZOMBIE_CHARGER = 6
- ZOMBIE_WITCH = 7
- ZOMBIE_TANK = 8
- ZSPAWN_WITCHBRIDE = 11