Template:BaseWeaponSE1: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (Substituted IO templates)
 
Line 11: Line 11:
==Inputs==
==Inputs==
{{minititle|Base}}
{{minititle|Base}}
{{IO|[[AddOutput]]|Evaluates a keyvalue/output on this entity. <br/>Format: <code><key> <value></code><br/>Format: <code><output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite></code>|param=string}}
{{I|[[AddOutput]]|Evaluates a keyvalue/output on this entity. <br/>Format: <code><key> <value></code><br/>Format: <code><output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite></code>|param=string}}
{{IO|FireUser1|to=FireUser4|Fire the <code>OnUser</code> outputs; see [[User Inputs and Outputs]].}}
{{I|FireUser1|to=FireUser4|Fire the <code>OnUser</code> outputs; see [[User Inputs and Outputs]].}}
{{IO|Kill|Removes this entity and any entities parented to it from the world.}}
{{I|Kill|Removes this entity and any entities parented to it from the world.}}
{{IO|KillHierarchy|Functions the same as <code>Kill</code>, although this entity and any entities parented to it are killed on the same frame, being marginally faster than <code>Kill</code>.}}
{{I|KillHierarchy|Functions the same as <code>Kill</code>, although this entity and any entities parented to it are killed on the same frame, being marginally faster than <code>Kill</code>.}}


==Outputs==
==Outputs==
{{minititle|Weapon}}
{{minititle|Weapon}}
{{IO|OnNPCPickup|Fires when an [[NPC]] picks up this weapon. {{activator|NPC}}}}
{{O|OnNPCPickup|Fires when an [[NPC]] picks up this weapon. {{activator|NPC}}}}
{{IO|OnPlayerUse|Fires when the player [[+use]]s this weapon. {{PlAct}}}}
{{O|OnPlayerUse|Fires when the player [[+use]]s this weapon. {{PlAct}}}}
{{IO|OnPlayerPickup|Fires when a player picks up this weapon. {{PlAct}}}}
{{O|OnPlayerPickup|Fires when a player picks up this weapon. {{PlAct}}}}
{{minititle|Targetname}}
{{minititle|Targetname}}
{{IO|OnUser1|to=OnUser4|These Outputs each fire in response to the firing of the like-numbered <code>FireUser1</code> to <code>FireUser4</code> Input; see [[User Inputs and Outputs]].}}
{{O|OnUser1|to=OnUser4|These Outputs each fire in response to the firing of the like-numbered <code>FireUser1</code> to <code>FireUser4</code> Input; see [[User Inputs and Outputs]].}}
{{IO|OnUse|Fired when the <code>Use</code> input is given.}}
{{O|OnUse|Fired when the <code>Use</code> input is given.}}


<noinclude>
<noinclude>
[[Category: Sin Episodes]]
[[Category: Sin Episodes]]
</noinclude>
</noinclude>

Latest revision as of 11:20, 21 April 2025

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

Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

Weapon:

PrimaryAmmoCount ([todo internal name (i)]) <integer>
Primary Ammo Count.
SecondaryAmmoCount ([todo internal name (i)]) <integer>
Secondary Ammo Count.

Flags

  • 1 : Start Constrained. Prevents the model from moving.

Inputs

Base:

AddOutput <string>
Evaluates a keyvalue/output on this entity.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster than Kill.

Outputs

Weapon:

OnNPCPickup
Fires when an NPC picks up this weapon. (!activator is the NPC)
OnPlayerUse
Fires when the player +uses this weapon. (!activator is the player.)
OnPlayerPickup
Fires when a player picks up this weapon. (!activator is the player.)

Targetname:

OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnUse
Fired when the Use input is given.