weapon_uzi

Modified

12-Jul-2023

An uzi, which can store 32 bullets in its clip. You can carry 250 bullets as backpack ammo. Uses ammo_9mmAR/ammo_9mmbox/ammo_9mmclip/ammo_uziclip. Some donors and Sven Co-op staff members have the golden uzi in place of the normal uzi, which causes double damage but has less accuracy. Regardless of the CVar 'mp_weaponstay', you can pickup a second uzi from a weapon_uzi 15 seconds after picking up the first, unless someone else picks up from it in the meantime, resetting the delay. CVars:

  • sk_plr_uzi# (Default: 10, 10, 16): Uzi bullet hit damage.

Keyvalues


OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.

Name targetname : Set name of weapon_uzi so other entities can trigger it. Only 'On' and 'Toggle' trigger use-types are accepted which makes weapon be picked up by player '!activator'. Kill-targeting this entity will remove weapon_uzi and stop it from respawning.

Pitch Yaw Roll (X Y Z) angles : Where Z means Y and Y means Z, that is, when you're thinking Hammer-grid. (Hammer uses Z for height and Y for depth, while every other sane 3D-application does this the other way round; nonetheless this keyvalue description has the letters in the conventional order) This, technically, is a 3D-vector containing Euler-angles to describe either the entity's rotation or direction of effect. E.g. a func_door_rotating will use this as its initial rotation, while a trigger_push will keep its original alignment and use this for the direction of its push-effect instead. Euler-angles are a hierarchical system to determine an object's orientation in 3D-space. A yaw-value of 0 would mean the entity would face east. (right in top-down view) 90 would mean it would face north. (up in top-down-view) After yaw, pitch is applied. Think aiming up/down with your character in first person. At last, the roll-value is applied. Think your character falling over sideways in first person. Some entities, mostly point entities, do not use the angles keyvalue for any purpose.

Render FX renderfx : Set custom render FX effect. Only works when "Render Mode" is set to different than 'Normal'

  • 0 : Normal : Default rendering.
  • 1 : Slow Pulse : Transparency slow fading in and out in a loop.
  • 2 : Fast Pulse : Transparency fast fading in and out in a loop.
  • 3 : Slow Wide Pulse : Transparency slow fading in and out widely in a loop.
  • 4 : Fast Wide Pulse : Transparency fast fading in and out widely in a loop.
  • 9 : Slow Strobe : Regular slow appearing/dissapearing.
  • 10 : Fast Strobe : Regular fast appearing/dissapearing.
  • 11 : Faster Strobe : Regular very fast appearing/dissapearing.
  • 12 : Slow Flicker : Random slow appearing/dissapearing.
  • 13 : Fast Flicker : Random fast appearing/dissapearing.
  • 5 : Slow Fade Away : Not working. Fading out slowly until reaching invisibility. Works once when entity spawns or have changed it's "Render FX" at a runtime (e.g. through env_render). Requires high "FX Amount"
  • 6 : Fast Fade Away : Not working. Fading out quickly until reaching invisibility. Works once when entity spawns or have changed it's "Render FX" at a runtime (e.g. through env_render). Requires high "FX Amount"
  • 7 : Slow Become Solid : Not working. Fading in slowly from invisible to fully visible. Works once when entity spawns or have changed it's "Render FX" at a runtime (e.g. through env_render). Requires low or zero "FX Amount"
  • 8 : Fast Become Solid : Not working. Fading in quickly from invisible to fully visible. Works once when entity spawns or have changed it's "Render FX" at a runtime (e.g. through env_render). Requires low or zero "FX Amount"
  • 14 : Constant Glow : Sprites with 'Glow' render mode only. Disables sprite resizing.
  • 15 : Distort : Random distortion, looped.
  • 16 : Hologram (Distort + fade) : 'Random distortion' + 'Pulse' applied, looped.
  • 19 : Glow Shell : Applies nice animated glowing shell on model. Color can be applied. "FX Amount" manipulates glow shell size.

Render Mode rendermode : Render mode determines how this entity is rendered.

  • 0 : Normal : Normal rendering. Entity will receive light, except if it is a sprite. "FX Amount" is obsolete when this is used.
  • 1 : Color : Brush entities only: Instead of rendering the texture, the whole entity will appear in one color, set by "FX Color". "FX Amount" sets the transparency. 0 means invisible. 255 means fully opaque.
  • 2 : Texture : Texture-only rendering. Entity will not receive light. Instead, only the texture will be rendered as is. "FX Amount" sets the transparency. 0 means invisible. 255 means fully opaque. This is used for transparent things such as windows. Tip: If you have a window separating a dark and a bright room using only one entity, you can apply a brighter glass texture to the side of the window seen from within the dark room than to the side seen from the bright room. That way, the window's brightness will look realistic from both sides, instead of from just one. Generally, darker rooms require the render amount to be lower, making the glass more transparent, or it would look illogically bright.
  • 3 : Glow : Sprites only. The sprite will appear in the same size regardless of your distance to it. In addition to that, the further away you are from it, the less visible it will be. (It's only barely visible at about 500 units far away) Good for light coronas. This renders the sprite in additive mode.
  • 4 : Solid : Brush entities only. All textures of the brush entity starting with '{' will have the last color of their palette (usually blue, black or purple) be rendered fully transparent. This is used for textures with see-through parts, such as grates and railings. Requires "FX Amount" to be set to a value greater than 0, commonly 255.
  • 5 : Additive : Works just as the "Render Mode" 'Texture', except that the entity's appearance will be added to the background instead of forming a mean. This means, black pixels of textures will be fully transparent, while full-bright pixels are added with a factor of "FX Amount" divided by 255. This is often used for sprites indicating a glowing light, as well as for overlay func_illusionaries to give a computer texture the appearance of having many small, glowing lights, screens and whatever other elements. Render-amount of 255 makes it bright. 0 makes it invisible.

FX Amount (1 - 255) renderamt : Render amount to use when other than "Render Mode" 'Normal' is used.

FX Color (R G B) rendercolor : Used with "Render Mode" 'Color' and 'Glow' to set color. Also sets color of 'Glow Shell' "Render Mode".

Gravity Setting movetype : Determines how items behave after spawn.

  • -1 : Unmoveable : Make item completely unmovable by any external influence, unless changed at runtime by e.g. trigger_changevalue.
  • 0 : Fall to the ground (default) : Entity fall to first brush beneath it. Note that not all entities with collision may block items to fall through them.
  • 5 : Hover in the air : Items won't fall from it's starting position.
  • 8 : Hover in the air, ignore brush collision : Items won't fall from it's starting position and won't be affected by brush collision.

Custom respawn time m_flCustomRespawnTime : Customize pickup respawn delay in seconds.

Custom Damage dmg : Custom damage of weapon.

Custom V_Model wpn_v_model : You can set the custom view model (v_model) for this item here. It's a 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 on-ground weapon 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/" 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.

  • 0 : Yes
  • 1 : No

Target target : Entity to trigger when weapon is picked up. Trigger use-type is 'Toggle'.

Delay Before Trigger delay : Delay before trigger entity specified in "Target".

Kill Target killtarget : Entity to remove when weapon is picked up.

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.

  • 0 : No
  • 1 : Yes

Flags


  • 128 : TOUCH Only : Pick this item up only by touching it.

  • 256 : USE Only : Pick this item up only by using it ('USE' key).

  • 512 : Can Use w/o LoS : Player can pick up this item even when it's not within his line of sight.

  • 1024 : Disable Respawn : Disables default item respawning.

  • 2048 : Not in Deathmatch : Obsolete in Sven Co-op. Makes the entity don't appear in Multiplayer Games.

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.