This item has been removed from the community because it violates Steam Community & Content Guidelines. It is only visible to you. If you believe your item has been removed by mistake, please contact Steam Support.
This item is incompatible with . Please see the instructions page for reasons why this item might not work within .
Current visibility: Hidden
This item will only be visible to you, admins, and anyone marked as a creator.
Current visibility: Friends-only
This item will only be visible in searches to you, your friends, and admins.
EMS: Random Item Spawning Script
This is a slightly simpler version of the random item spawning script I made for Gun Hunt. It is only usable with the Extended Mutation System in the Left 4 Dead 2 Beta.
The script gives you the ability to randomly spawn items at preset spawnpoints at any time you choose. It's a similar to the weapon spawning in Killing Floor, or the Battlefield 3 Scavenger mode. It is made to work in an EMS mutation script, but can with some modification work with map level scripts as well.
NOTE! The up to date version of the script is avalable in VSLib[github.com].
Pastebin links (old version without class): Script[pastebin.com] Entity Group[pastebin.com]
The spawner uses an array of vectors or VSLib entities for spawn points.
To use the script, include it into any script with: IncludeScript("VSLib");
To intitialize a spawner create a spawner object: VSLib.RandomItemSpawner(spawnArray, itemArray = null, flags = 0)
There are two optional argumets:
itemList: Use a custom item list of the same format as the one below. flags: RANDOM_USEPARTICLES: Spawns a fireworks particle effect where an item spawns. RANDOM_ALLOWMULTIPLEITEMS: Can spawn multiple items on the same spawnpoint during a single call of SpawnRandomItems().
This list determines what items can spawn, and the probability of each weapon spawning. If no list is specified, the default one below is used.
The item probability is relative to the other items, the actual spawning probability is the items probability divided by the probabilities of all items added together.
Melee weapons and upgrades get converted to other entities when they spawn. They are untrackable, and will not be returned by the spawning function.
ent: Classname of the item. The spawn list currently supports the entities specified below. prob: This is the probability for the item to spawn. ammo: The ammo reserves primary weapons spawn with. Weapons spawn with double the value set. Set to null on other items. melee_type: Works the same way as on a weapon_melee_spawn. Set to null if not a melee weapon.