Item ammo smg1: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (removed {{DISPLAYTITLE}}, covered by the hl2 point template)
(updates)
Line 1: Line 1:
[[Image:Item_ammo_smg1.jpg|thumb|right|250px|An item_ammo_smg1 entity.]]
{{lang|Item ammo smg1}}
{{hl2 point|item_ammo_smg1}}
[[File:Item_ammo_smg1.jpg|thumb|right|250px|An <code>item_ammo_smg1</code> entity.]]
 
{{hl2 point|item_ammo_smg1}} It's a box of 4.6x30mm FMJ ammunition for the [[weapon_smg1|submachine gun]].
==Entity description==
A box of 4.6x30mm FMJ ammunition for the [[weapon_smg1|submachine gun]].


Despite the writing on it, the amount of ammo the box will contain depends on the current difficulty setting:
Despite the writing on it, the amount of ammo the box will contain depends on the current difficulty setting:
{{skill|54|45|27}}


* At the "Easy" (<code>skill 1</code>) setting the box will provide 54 rounds.
{{code class|CItem_BoxMRounds|item_ammo.cpp}}
* At the "Normal" (<code>skill 2</code>) setting the box will provide 45 rounds.
* At the "Hard" (<code>skill 3</code>) setting the box will provide 27 rounds.}}
 
==Keyvalues==
* {{KV Item}}
 
==Inputs==
* {{I Item}}


==Outputs==
{{KVIO ItemHL2}}
* {{O Item}}


==See also==
==See also==
* [[item_ammo_smg1_large]]
*{{ent|item_ammo_smg1_large}}
 
[[Category:Items]]

Revision as of 03:38, 11 September 2018

English (en)Translate (Translate)
An item_ammo_smg1 entity.

Template:Hl2 point It's a box of 4.6x30mm FMJ ammunition for the submachine gun.

Despite the writing on it, the amount of ammo the box will contain depends on the current difficulty setting:

  • Easy: 54
  • Normal: 45
  • Hard: 27
C++ In code, it is represented by theCItem_BoxMRoundsclass, defined in theitem_ammo.cppfile.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

Start Constrained : [1]
Spawns with motion disabled.

Outputs

Item:

OnPlayerTouch
Fires when the player touches this item. !activator is the player.
OnCacheInteraction
This output fires when the player proves they have "found" this item.
Fires on:
  • Player Touch (whether or not player actually acquires the item).
  • Picked up by +use.
  • Picked up by gravity gun.
  • Punted by gravity gun.

See also