Item weapon shotgun: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Classifying as model entity)
No edit summary
Line 1: Line 1:
{{back | Black Mesa Level Aesthetics}}
[[File: item_weapon_shotgun_bms.png | right | 160px]]
{{stub}}
[[File: item_weapon_shotgun_bms12.png | right | 160px]]
{{this is a|model entity|name=item_weapon_shotgun|game=Black Mesa}}  
{{this is a|model entity|name=item_weapon_shotgun|game=Black Mesa}} It is a shotgun pickup entity, which gives {{ent|weapon_shotgun}} for the {{ent|player}} when picked up.  It also gives {{ent|item_ammo_shotgun}} {{not|{{bms12|4}}}}.


It is the {{w|Franchi SPAS-12}} Shotgun. It can first be seen in the chapter [[Office Complex]] where a security guard is being attacked by a zombie security guard behind a maintenance area fence. If the player dispatches the zombie, the guard will let you inside the area, showing you his stash of supplies, and most importantly, the shotgun. The shotgun is good for close-quarter levels, where enemies are not that far away. It packs a punch against enemies like [[vortigaunts]] and zombies, and it can shoot one or both of the barrels, making it even more powerful.
Represented by class <code>CItem_weapon_shotgun</code>.
 
{{note|Most objects that inherit class {{code|CBasePickup}} in {{bms|1}} have the following features:
* They're [[VPhysics]] objects (disabled in multiplayer mode).
* Respawn in multiplayer mode (''item_weapon_'' entities creating [[Env xen portal effect|xen portal effects]] as well).
* No physics and collision in multiplayer.
* Model can be changed to your own via the parameter (which is not in the FGD by default, added in [https://github.com/MyGamepedia/Enhanced-Black-Mesa-FGD Enhanced Black Mesa FGD]).
}}
{{bug|hidetested=1|Doesn't collide with other {{code|CBasePickup}} and ''weapon_'' entities {{not|{{bms12}}}}.}}
 
{{Confusion|Not to be confused with {{ent|weapon_shotgun}}. The key difference between ''weapon_'' and ''item_weapon_'' entities are:
* The respawn mechanics in multiplayer and the respawn sound are different.
* ''weapon_'' physics and collision isn't disabled in multiplayer.
* ''weapon_'' model cannot be changed with properties.
* Different inputs, outputs and flags.
* ''item_weapon_'' can be destroyed by damaging it ([[item_weapon_snark|nest with snarks]] only).
* ''weapon_'' are not giving extra ammo.}}
 
==Keyvalues==
{{KV|Respawn Time|intn=respawntime|float|Time waited between respawns in multiplayer mode.}}
{{KV|Model|intn=model|studio|Model to use for this entity.
{{note|Multiplayer mode will not override this value for models with animated sheen if the value isn't default.}}
|nofgd=1}}
 
==Outputs==
{{O|OnPlayerDenied|param=void|Fires if the player has not picked it up when touched.}}
{{O|OnPlayerPickup|param=void|Fires if the player picked it up.}}
 
==Inputs==
{{I|AttachTo|param=void|Attaches this entity to [[!activator]], the entity becomes impossible to pick up. It becomes invisible in first person mode, but only in [[Steam]] versions of the game only.}}
{{I|Respawn|param=void|Respawn this entity in multiplayer. Fired by this entity after the amount of time from ''Respawn Time'' property.}}
{{I|Disable|param=void|Make this item invisible and disable the ability to be picked up by players.
{{important|Does not disable physics and collision.}}
}}
{{I|Enable|param=void|Make this item visible and enable the ability to be picked up by players.}}
{{I|Fall|param=void|Doesn't seem to work.}}
 
==Flags==
{{Fl|1|[[Physics optimization|Start Asleep]]}}
{{Fl|2|[[Physics optimization|Motion Disabled]]}}
{{Fl|4|Hard Respawn|Respawn this entity even if it's already spawned. The timer will cycle throughout entire round. Picking up does not restart the timer.}}
{{Fl|8|Silent Pickup|Pick up this entity with no sound and [[HUD]] animation.}}
 
==See also==
* {{ent|weapon_shotgun}} - the shotgun weapon entity
* {{ent|item_ammo_shotgun}} - the shotgun ammo entity

Revision as of 06:58, 20 May 2025

Item weapon shotgun bms.png
Item weapon shotgun bms12.png

item_weapon_shotgun is a model entity available in Black Mesa Black Mesa. It is a shotgun pickup entity, which gives weapon_shotgun for the player when picked up. It also gives item_ammo_shotgun (not in Black Mesa (mod) Black Mesa (mod)).

Represented by class CItem_weapon_shotgun.

Note.pngNote:Most objects that inherit class CBasePickup in Black Mesa have the following features:
  • They're VPhysics objects (disabled in multiplayer mode).
  • Respawn in multiplayer mode (item_weapon_ entities creating xen portal effects as well).
  • No physics and collision in multiplayer.
  • Model can be changed to your own via the parameter (which is not in the FGD by default, added in Enhanced Black Mesa FGD).
Icon-Bug.pngBug:Doesn't collide with other CBasePickup and weapon_ entities (not in Black Mesa (mod)).
Warning.pngRisk of Confusion:Not to be confused with weapon_shotgun. The key difference between weapon_ and item_weapon_ entities are:
  • The respawn mechanics in multiplayer and the respawn sound are different.
  • weapon_ physics and collision isn't disabled in multiplayer.
  • weapon_ model cannot be changed with properties.
  • Different inputs, outputs and flags.
  • item_weapon_ can be destroyed by damaging it (nest with snarks only).
  • weapon_ are not giving extra ammo.

Keyvalues

Respawn Time (respawntime) <float>
Time waited between respawns in multiplayer mode.
Model (model) <model path> !FGD
Model to use for this entity.
Note.pngNote:Multiplayer mode will not override this value for models with animated sheen if the value isn't default.

Outputs

OnPlayerDenied <void>
Fires if the player has not picked it up when touched.
OnPlayerPickup <void>
Fires if the player picked it up.

Inputs

AttachTo <void>
Attaches this entity to !activator, the entity becomes impossible to pick up. It becomes invisible in first person mode, but only in Steam versions of the game only.
Respawn <void>
Respawn this entity in multiplayer. Fired by this entity after the amount of time from Respawn Time property.
Disable <void>
Make this item invisible and disable the ability to be picked up by players.
Icon-Important.pngImportant:Does not disable physics and collision.
Enable <void>
Make this item visible and enable the ability to be picked up by players.
Fall <void>
Doesn't seem to work.

Flags

Start Asleep : [1]
Motion Disabled : [2]
Hard Respawn : [4]
Respawn this entity even if it's already spawned. The timer will cycle throughout entire round. Picking up does not restart the timer.
Silent Pickup : [8]
Pick up this entity with no sound and HUD animation.

See also