Info_multispawn And Info_groupspawn
#257 posted by
Preach on 2008/06/24 14:48:18
Both of these entities are for spawning multiple monsters(or items are supported now) from a single entity. Combined with corpse removal or judicious killtarget use, this lets you juggle entities in a large map. They differ in the position and way they put the monsters into the map once triggered - the multispawn teleports the monsters in one at a time from the origin of the object; the groupspawn teleports a whole squad in at once.
info_multispawn
Quoting from the old documents on func_hordespawn:
This entity spawns them in one at a time from the same point (it's origin). The entity will only spawn a monster if there is room, and will wait if there isn't. Once it is activated, it will spawn until it has created the amount of monsters specified.
The value for "spawnclassname" and "spawnfunction" should be the classname for the type of monster to be spawned e.g. monster_demon1. Both of these values must be added and both must be the same. Only one type of monster can be spawned form each func_hordespawn.
Specify the number of monsters to spawn with "count". Default is 3.
Key change here, the default value of "count" for an info_multispawn is 1 instead of 3. Note that if you use the old name of func_hordespawn then the default remains 3. This is the only difference between these two entity classes, and the latter only exists for legacy support. So don't include it in entity definition files "just for completeness".
The "wait" key as usual is used to specify the pause between each spawning.
If you want to have different types of monster spawning into a horde, you can use multiple func_hordespawns but you cannot place them on top of each other without risking different monsters getting stuck.
It should be added that only the following keys get transfered from the info_multispawn to the monsters spawned from it:
angles
spawnflags
target
corpse_time
startonground
aflag
For anything more sophisticated(if you're trying some entity hack for example), you need to add the entity in the regular manner.
info_groupspawn
All the info about setting spawnclassname, spawnfunction, count and which keys are transfered is common to both these entities.
The wait key is not used. Instead, the monsters are spawned in a grid starting from the origin of the entity. The entities are spaced "lip" units apart, and the rows are "t_width" units wide in total. So to get a 3x2 block of monsters 64 units apart, set "lip" to "64" and t_width to "192" You may have to experiment a little to get the placement and values correct. (thanks to Kinn for this idea)