Weapon melee spawn: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added the “shovel” and “pitchfork” values in the keyvalue list for the new shovel and pitchfork melee weapons added in the Last Stand update)
m (→‎Keyvalues: changed the list ov melee weapons with the one from the "Weapon_and_Item_Spawning" page.)
Line 5: Line 5:
The names of the spawnable melee weapons have to be included in the text field. Names are:
The names of the spawnable melee weapons have to be included in the text field. Names are:


* <code>golfclub</code>
* <code>Any</code> – director will place any melee weapon listed in the Missionfile's "meleeweapons" string.
* <code>baseball_bat</code>
* <code>cricket_bat</code>
* <code>crowbar</code>
* <code>electric_guitar</code>
* <code>fireaxe</code>
* <code>fireaxe</code>
* <code>frying_pan</code>
* <code>frying_pan</code>
* <code>golfclub</code>
* <code>katana</code>
* <code>knife</code>
* <code>machete</code>
* <code>machete</code>
* <code>baseball_bat</code>
* <code>pitchfork</code>
* <code>crowbar</code>
* <code>shovel</code>
* <code>cricket_bat</code>
* <code>tonfa</code>
* <code>tonfa</code>
* <code>katana</code>
* <code>electric_guitar</code>
* <code>shovel</code>
* <code>pitchfork</code>
* <code>Any</code> – director will place any available melee weapon


You may also list multiple specific melee weapons separated by a comma, and the director will select from among that subset of weapons:
You may also list multiple specific melee weapons separated by a comma, and the director will select from among that subset of weapons:


  crowbar,fireaxe,machete
  crowbar,fireaxe,machete
You may even have additional custom melee weapons by crating a working weapon model and then creating a melee weapon script in "scripts/melee". Copy an existing one as a base and modify it to make it easier for you.<br>
The name of that script, without extention, is the name to use in the missionfile to allow it at all, and the weapon_melee_spawn entity.
{{KV WeaponSpawn}}
{{KV WeaponSpawn}}



Revision as of 22:14, 2 February 2021

Template:L4d2 point Is is a spawn point for any melee weapon.

Keyvalues

Melee Weapon ([todo internal name (i)]) <string>
Options: 'Any' or a comma-delimited string of melee weapon script names. Leave blank for none.

The names of the spawnable melee weapons have to be included in the text field. Names are:

  • Any – director will place any melee weapon listed in the Missionfile's "meleeweapons" string.
  • baseball_bat
  • cricket_bat
  • crowbar
  • electric_guitar
  • fireaxe
  • frying_pan
  • golfclub
  • katana
  • knife
  • machete
  • pitchfork
  • shovel
  • tonfa

You may also list multiple specific melee weapons separated by a comma, and the director will select from among that subset of weapons:

crowbar,fireaxe,machete

You may even have additional custom melee weapons by crating a working weapon model and then creating a melee weapon script in "scripts/melee". Copy an existing one as a base and modify it to make it easier for you.
The name of that script, without extention, is the name to use in the missionfile to allow it at all, and the weapon_melee_spawn entity.


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

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)


See also

Weapon and Item Spawning