Player

From Valve Developer Community

Jump to: navigation, search

This article is a stub. You can help by adding to it.

Note:This entity is not listed in the FGD, and is not intended to be placed in a map with hammer.
Note:Key/values, inputs and outputs vary depending on engine version. (needs more research- this stuff is from ep2)

Contents

Entity Description

The player. This entity still exists even if the player is dead.

Keyvalues

Defines the name that other entities refer to this entity by.
  • friction
  • health
The player's health.
  • max_health
The value of "health" cannot exceed this.
  • physdamagescale

Inputs

  • Targetname:

Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
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.
  • Parentname:

SetParent <targetname>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
SetParentAttachmentMaintainOffset <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 its current movement hierarchy.
  • RenderFields:

Color <color255>
Set the rendercolor.
Alpha <byte>
Set the renderamt.
  • IgnoreFallDamage
  • IgnoreFallDamageWithoutReset
  • OnSquadMemberKilled
  • DisableFlashlight
Disables the player's flashlight.
  • EnableFlashlight
Enables the player's flashlight.
  • ForceDropPhysObjects
  • SetHealth <integer>
Sets the player's health. Values clamped between 0 and max_health.
  • SetHUDVisibility
  • SetFogController
  • physdamagescale
  • KilledNPC
  • skin <integer>
Sets the model's skin.


Outputs

  • Targetname:

OnUser1 to OnUser4
Fired in response to the FireUser inputs; see User Inputs and Outputs.
OnKilled (New with Left 4 Dead)
Fired when the entity is killed and removed from the game.
  • OnIgnite
Fired when the entity is ignited.
Personal tools