Weapon spawn: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added note about physics)
(added internal names)
Line 3: Line 3:


== Keyvalues ==
== Keyvalues ==
{{KV|Selection|choices|Spawn the selected weapon or weapon category}}
{{KV|Selection|intn=weapon_selection|choices|Spawn the selected weapon or weapon category}}
:{| class=standard-table
:{| class=standard-table
! Value || Description
! Value || Description
Line 63: Line 63:
| <code>weapon_sniper_scout</code> || Sniper Scout
| <code>weapon_sniper_scout</code> || Sniper Scout
|}
|}
{{KV|Spawn instantly without director|boolean|Bypass the proximity checks that make nearby weapons be the same tier / not the same weapon}}
{{KV|Spawn instantly without director|intn=spawn_without_director|boolean|Bypass the proximity checks that make nearby weapons be the same tier / not the same weapon}}
{{KV|No CS Weapons|boolean|When selecting 'any' weapon, set this to true if you do not want CS weapons.}}
{{KV|No CS Weapons|intn=no_cs_weapons|boolean|When selecting 'any' weapon, set this to true if you do not want CS weapons.}}
{{KV WeaponSpawn|modelwarning=1}}
{{KV WeaponSpawn|modelwarning=1}}



Revision as of 15:41, 9 July 2022

Template:L4d2 point It is a configurable spawner for any non-melee weapon.

Note.pngNote:Because this entity uses WeaponSpawnSingle as a base, it has the Enable Physics Flag. However, all weapons will automatically spawn with physics enabled, no matter if the flag is used or not.

Keyvalues

Selection (weapon_selection) <choices>
Spawn the selected weapon or weapon category
Value Description
any Any primary or secondary weapon
any_pistol Any Pistol
weapon_pistol Pistol
weapon_pistol_magnum Magnum Pistol
any_primary Any Primary Weapon
tier1_any Any tier 1 primary
tier2_any Any tier 2 primary
any_smg Any tier 1 SMG
any_rifle Any tier 2 Rifle
any_sniper_rifle Any tier 2 Sniper Rifle
any_shotgun Any Shotgun
tier1_shotgun Any tier 1 Shotgun
tier2_shotgun Any tier 2 Shotgun
weapon_smg SMG
weapon_smg_silenced Silenced SMG
weapon_pumpshotgun Pump Shotgun
weapon_shotgun_chrome Chrome Shotgun
weapon_autoshotgun Auto Shotgun
weapon_shotgun_spas SPAS Shotgun
weapon_rifle M4 Rifle
weapon_rifle_desert Desert Rifle
weapon_rifle_ak47 AK47
weapon_hunting_rifle Hunting Rifle
weapon_sniper_military Sniper Military
weapon_smg_mp5 MP5
weapon_rifle_sg552 SG552
weapon_sniper_awp Sniper AWP
weapon_sniper_scout Sniper Scout
Spawn instantly without director (spawn_without_director) <boolean>
Bypass the proximity checks that make nearby weapons be the same tier / not the same weapon
No CS Weapons (no_cs_weapons) <boolean>
When selecting 'any' weapon, set this to true if you do not want CS weapons.
Count (count) <integer>
Max number of weapons given before disappearing.
Weapon Skin (weaponskin) <integer>
Some weapons have multiple versions of their textures, called skins. Set this to a number other than -1 to make the given weapon use that skin instead of the default.
Glow Range (glowrange) <float>
Set a custom glow range for this spawner. 0 means use the default range.
Glow Backface Multiple (glowbackfacemult) <float> (only in Left 4 Dead 2) !FGD
If this object has a glow effect, multiply the effect by this much on the sides of the object that are facing away from the viewer.

Flags

  • 16 : Constrain to spawn position (don't drop to the ground)


Enable Physics : [1]
Must Exist : [2]
Infinite items (overrides count) : [8] (only in Left 4 Dead 2)
Absorb any dropped weapon type : [4] (only in Left 4 Dead 2)
Don't cluster with similar items : [131072] (only in Left 4 Dead)