Entity Article Template: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added example)
(Does displaytitle even work?)
Line 1: Line 1:
<nowiki>{{DISPLAYTITLE:Entity Name}}</nowiki><br />
<nowiki>{{{<game acronym> <point/brush>|<entity class name>}}}</nowiki>
<nowiki>{{{<game acronym> <point/brush>|<entity class name>}}}</nowiki>
{{syntax2
{{syntax2

Revision as of 14:02, 21 January 2014

{{{<game acronym> <point/brush>|<entity class name>}}}

 
 Example {{css point|ammo_57mm}} 
   Results Counter-Strike: Source ammo_57mm is a point entity available in Counter-Strike: Source.
Tip.pngTip:If the entity is available everywhere, use "base" as game acronym.

Entity description

This should be a plainly-worded but accurate description of the basic function of the entity. A basic description for most entities is included in the help built into Hammer.

For an NPC's inputs, outputs etc. the npc_sniper article could be handy. Many of the details seem the same for different NPCs, so it could save typing.

The information for the entity Keys, Outputs, and Inputs can be found inside the Hammer entity help, or in the FGD. Flag names can only be found in the FGD.

Dedicated Console Variables - omit if none exist

cvar_name
Omittable Description
sk_barney_health <integer>
Barney's spawn health

Keyvalues - omit if none exist

Tip.pngTip:See Category:Keyvalue Templates for a list of available templates.
Keyvalue Name ([todo internal name (i)]) <vartype>
A description of the Keyvalue.
Brightness ([todo internal name (i)]) <color255>
The color of the spotlight cone.

Half-Life 2 Half-Life 2

Tip.pngTip: Use === {{Game link|Game Name}} === to sort Keyvalues that exist only in selected games.
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

Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
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.
Minimum / Maximum DX Level (mindxlevel / maxdxlevel) <integer choices> (removed since Left 4 Dead)
The entity will not exist if the engine is running outside the given range of DirectX Versions.
Choices
Warning.pngWarning:If these are used, the object may break when the user switches their DirectX settings.[missing string]

Flags - omit if none exist

Tip.pngTip:See Category:Flag Templates for a list of available templates.
  • Integer value : Flag Name
Omissible description
  • Integer value : Flag Name
Omissible description

Inputs - omit if none exist

Tip.pngTip:See Category:Input Templates for a list of available templates.


Input Name <vartype>
A description of the Input.
SetSpeed <floatRedirectInput/float>
Set the speed of the train, as a ratio of max speed [0, 1]


Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

Outputs - omit if none exist

Tip.pngTip:See Category:Output Templates for a list of available templates.


Output Name
A description of the Input.
OnPressed
Fired when the button is pressed.


See also

Note.pngNote:Add links to related articles, entities, or tutorials here.