Weapon spawn: Difference between revisions
Jump to navigation
Jump to search
Ninjaofsauce (talk | contribs) (l4d2 icon) |
(Various improvements) |
||
| Line 1: | Line 1: | ||
{{LanguageBar}} | {{LanguageBar}} | ||
[[File:{{WeaponL4D/image/switch|w{{#expr: {{CURRENTHOUR}} mod 17}}}}|300px | [[File:{{WeaponL4D/image/switch|w{{#expr: {{CURRENTHOUR}} mod 17}}}}|thumb|300px|{{ File:{{WeaponL4D/image/switch|w{{#expr: {{CURRENTHOUR}} mod 17}}}} }}]] | ||
{{CD|CWeaponSpawnConfigurable}} | {{CD|CWeaponSpawnConfigurable}} | ||
{{ | {{This is a|model entity|name=weapon_spawn|game=Left 4 Dead 2}} It is a configurable spawner for any non-melee weapon. | ||
== Keyvalues == | == Keyvalues == | ||
{{KV|Selection|intn=weapon_selection|choices|Spawn the selected weapon or weapon category}} | {{KV Targetname}} | ||
{{KV WeaponSpawn|l4d2only=1}} | |||
{{KV|Selection|intn=weapon_selection|string choices|Spawn the selected weapon or weapon category:}} | |||
:{| class=standard-table | :{| class=standard-table | ||
! Value || Description | ! Value || Description | ||
| Line 18: | Line 19: | ||
| <code>weapon_pistol_magnum</code> || Magnum Pistol | | <code>weapon_pistol_magnum</code> || Magnum Pistol | ||
|- | |- | ||
| <code>any_primary</code> || Any Primary Weapon | | <code>any_primary</code> || Any Primary Weapon (default) | ||
|- | |- | ||
| <code>tier1_any</code> || Any tier 1 primary | | <code>tier1_any</code> || Any tier 1 primary | ||
| Line 66: | Line 67: | ||
| <code>weapon_sniper_scout</code> || Sniper Scout | | <code>weapon_sniper_scout</code> || Sniper Scout | ||
|} | |} | ||
{{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|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|intn=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.}} | ||
== Flags == | == Flags == | ||
{{ | {{Fl|1|Enable Physics}} | ||
{{Fl|2|Must Exist}} | |||
{{Fl|4|Absorb any dropped weapon type}} | |||
{{Fl|8|Infinite items (overrides count)}} | |||
{{Fl|16|Constrain to spawn position (don't drop to the ground)}} | |||
== See Also == | == See Also == | ||
* {{ent|weapon_item_spawn | * {{ent|weapon_item_spawn}} | ||
Revision as of 10:32, 7 November 2025
| CWeaponSpawnConfigurable |
weapon_spawn is a model entity available in
Left 4 Dead 2. It is a configurable spawner for any non-melee weapon.
Keyvalues
- Name (targetname) <string>
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report. - See also: Generic Keyvalues, Inputs and Outputs available to all entities
- 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.
- Collisions (solid) <choices>
-
- 0: Not Solid
- 2: Use Bounding Box
- 6: Use VPhysics (default)
- Count (count) <integer>
- Max number of weapons given before disappearing.
- Selection (weapon_selection) <string choices>
- Spawn the selected weapon or weapon category:
Value Description anyAny primary or secondary weapon any_pistolAny Pistol weapon_pistolPistol weapon_pistol_magnumMagnum Pistol any_primaryAny Primary Weapon (default) tier1_anyAny tier 1 primary tier2_anyAny tier 2 primary any_smgAny tier 1 SMG any_rifleAny tier 2 Rifle any_sniper_rifleAny tier 2 Sniper Rifle any_shotgunAny Shotgun tier1_shotgunAny tier 1 Shotgun tier2_shotgunAny tier 2 Shotgun weapon_smgSMG weapon_smg_silencedSilenced SMG weapon_pumpshotgunPump Shotgun weapon_shotgun_chromeChrome Shotgun weapon_autoshotgunAuto Shotgun weapon_shotgun_spasSPAS Shotgun weapon_rifleM4 Rifle weapon_rifle_desertDesert Rifle weapon_rifle_ak47AK47 weapon_hunting_rifleHunting Rifle weapon_sniper_militarySniper Military weapon_smg_mp5MP5 weapon_rifle_sg552SG552 weapon_sniper_awpSniper AWP weapon_sniper_scoutSniper 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.
Flags
- Enable Physics : [1]
- Must Exist : [2]
- Absorb any dropped weapon type : [4]
- Infinite items (overrides count) : [8]
- Constrain to spawn position (don't drop to the ground) : [16]