CWeaponSpawn
Jump to navigation
Jump to search
Code classes:
CWeaponSpawn
CItem
(items)CBaseAnimating
(models)CBaseEntity
(all ents)
CWeaponSpawn
is a code class in which is inherited by all the entities that might spawn an item players can use. Spawner entities give you more control over the spawning of weapons than simply placing a weapon entity, and cut down on the networking load.
Flags[edit | edit source]
- 1: Enable Physics - Item falls to the ground naturally instead of staying in place.
- 2: Must Exist - Makes the item always spawn. (Items are randomly chosen to spawn or not spawn.)
- 4:
Absorb any dropped weapon type(only available in ) - Nearby dropped items of the same type will be erased and replenish the Count by one. Always done regardless of this flag.
Keyvalues[edit | edit source]
- Count
(count)
<integer>
- How many instances of the item can be taken before the entity disappears forever. Ammo upgrades should always use 4 and only let a player use that entity once. Nearby dropped items of the same type will be erased and replenish the count by one.
- Item Skin
(weaponskin)
<integer>
(only available in ) - Some items have multiple versions of their textures, called skins. Set this to a number other than -1 to make the given item use that skin instead of the default.
- Glow Range
(glowrange)
<float>
(only available in ) - Set a custom glow range for this spawner. 0 means use the default range. To do: What is the default?
Collisions(solid)
<choices>
- No effect. Always uses VPhysics.