Weapons

From Sven Co-op
Revision as of 19:08, 12 May 2023 by Outerbeast (talk | contribs) (Under Construction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This page is under construction!


Weapons can be placed in the level as pickups that will equip the player with the weapon if they do not already have it in their loadout.
Supported weapons are:

  • weapon_357
  • weapon_9mmAR, weapon_mp5
  • weapon_9mmhandgun
  • weapon_crossbow
  • weapon_crowbar
  • weapon_displacer
  • weapon_eagle
  • weapon_egon
  • weapon_gauss
  • weapon_grapple
  • weapon_handgrenade
  • weapon_hornetgun
  • weapon_m16
  • weapon_m249, weapon_saw
  • weapon_medkit
  • weapon_minigun
  • weapon_pipewrench
  • weapon_rpg
  • weapon_satchel
  • weapon_shockrifle
  • weapon_shotgun
  • weapon_snark
  • weapon_sniperrifle
  • weapon_sporelauncher
  • weapon_tripmine
  • weapon_uzi
  • weapon_uziakimbo

1 Keyvalues

Gravity Setting : movetype

Determines how items behave after spawn. 'Fall to the ground' makes entity fall to first brush beneath it.
Note that not all entities with collision may block items to fall through them. Set 'Hover in the air' so items won't fall from it's starting position. You can also set 'Hover in the air, ignore brush collision' so item won't be affected by brush collision.
Use 'Unmoveable' to make item completely unmovable by any external influence, unless changed at runtime by e.g. trigger_changevalue.

Custom Damage : dmg

Custom damage of this weapon.

Custom V_Model : wpn_v_model

You can set the custom view model (v_model) for this item here. It's the first person weapon model.

Custom W_Model : wpn_w_model

You can set the custom world model (w_model) for this item here. It's weapon's on-ground model.

Custom P_Model : wpn_p_model

You can set the custom player model (p_model) for this item here. It shows on other players when they are holding it.

Sound Replacement File : soundlist

Set the path to a sound replacement file for the weapon. The path begins in 'svencoop/sound/mapname', whereas 'mapname' would be your map's name. You can go to the parent directory using '../'. A valid sound replacement file contains one or more lines with two sound-paths, which are separated by a space and wrapped into quotes. The first sound is the sound to be replaced. The second sound is the new sound. Sound-paths start in the sound directory. You cannot go to the parent directory using '../' in that case. These sounds do not need to be precached using a custom_precache point entity.

Custom Sprite Directory : CustomSpriteDir

HUD weapon sprites override. Custom sprites needs .txt file to be created and placed inside "sprites/<your custom folder>" directory. Content of those text files keeps the same format as other "weapon_X.txt" (where X is the name of the weapon) files inside "/sprites" folder. If you have your sprites text files under "sprites/mymap", the Custom Sprite Directory (this keyvalue) should be set to "mymap". Keep in mind that there must be a text file with name equivalent to this weapon name.

Is Ammo Item : IsNotAmmoItem

Is set to 'Yes', the weapon is not removed from the map when player pick it up, and 'mp_weaponstay' command is disabled.

Custom Respawn Time : m_flCustomRespawnTime

Customize pickup respawn delay in seconds.

Exclusive Hold : exclusivehold

If "Yes" is selected, the weapon must be picked up and cannot be switched to another weapon until dropped. This behaviour is invariably enabled for weapon_minigun and weapon_shockrifle.

2 Flags

128 : TOUCH only

Pick weapon up only by touching it.

256 : USE only

Pick weapon up only by using it ('USE' key).

512 : Can use w/o LoS

Player can pick up this weapon even when it's not in his line of sight.

1024 : Disable respawn

Disables default weapon respawning.

3 Notes

  • As all weapon-, ammo- and item- entities, this respawns after 15 seconds.
  • If "Touch only" and "Use only" flags are selected, the weapon can only be collected by trigger. When those flags are not selected, the weapon also can be collected by trigger, but only if player is the !activator.

4 Issues

weapon_uziakimbo: If you throw away one of your two uzis and recollect it, you will have both clips refilled without the cost of backpack ammunition.