Game weapon manager
Jump to navigation
Jump to search
Entity description
It is used to limit the number of a particular weapon type in the world. Useful in places where NPCs are spawning rapidly, dying, and dropping weapons.
This entity conducts a count of all the weapons in the world of my type and see if we have a surplus. If there is a surplus, try to find suitable candidates for removal. Right now we just remove the first weapons we find that are behind the player, or are out of the player's PVS.


In code it is represented by class CGameWeaponManager, defined in basecombatweapon_shared.cpp.
Keyvalues
- Weapon Classname (weaponname) <string>
- Classname of the weapon type to limit.
- Max Allowed in Level (maxpieces) <integer>
- The maximum amount of the specified weapon type allowed in the world.
- Ammo modifier (ammomod) <float>
- Modifier for amount of ammo dropped by a weapon.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Inputs
- SetAmmoModifier <float >
- Adjust the ammo modifier.