Logic playerproxy: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
(added OrangeBox stuff, I think...)
Line 20: Line 20:
* '''RequestPlayerHealth'''
* '''RequestPlayerHealth'''
: Requests the current player's health from the proxy. This will fire the PlayerHealth output with the value.
: Requests the current player's health from the proxy. This will fire the PlayerHealth output with the value.
* '''{{EP2 add|LowerWeapon}}'''
: Lowers the player's weapon.
* '''{{EP2 add|EnableCappedPhysicsDamage}}'''
: Causes player to take less damage from physics objects, and never more than 30 points from any individual strike.
* '''{{EP2 add|DisableCappedPhysicsDamage}}'''
: Undoes EnableCappedPhysicsDamage.
*'''{{EP2 add|SetLocatorTargetEntity <target_destination>}}'''
: Sets the entity that the HUD locator should track. (Usually a vehicle).


== Outputs ==
== Outputs ==
Line 33: Line 41:
* '''PlayerHasNoAmmo'''
* '''PlayerHasNoAmmo'''
: Fired by request if the player doesn't have any ammo.
: Fired by request if the player doesn't have any ammo.
* '''{{EP2 add|PlayerMissedAR2AltFire}}'''
: Fired when if player fired an AR2 combine ball that didn't kill any enemies.
* '''{{EP2 add|PlayerDied}}'''
: Fires when the player dies.

Revision as of 05:49, 31 May 2009

Template:Wrongtitle Template:Base point ep1

Entity description

An entity that is used to relay inputs/outputs to the player and back to the world.

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

Inputs

  • SetFlashlightSlowDrain
Puts the player's flashlight in slow-power-drain mode (for Episodic darkness)
  • SetFlashlightNormalDrain
Puts the player's flashlight to default power drain
  • SetPlayerHealth <integer>
Sets the player's health to this value.
  • RequestAmmoState
Request the ammo state of the player. It will fire PlayerHasAmmo or PlayerHasNoAmmo outputs.
  • RequestPlayerHealth
Requests the current player's health from the proxy. This will fire the PlayerHealth output with the value.
Lowers the player's weapon.
Causes player to take less damage from physics objects, and never more than 30 points from any individual strike.
Undoes EnableCappedPhysicsDamage.
Sets the entity that the HUD locator should track. (Usually a vehicle).

Outputs

  • OnFlashlightOn <float>
Fired when the player turns on his flashlight. This output has the value of how much energy the player had when this happened [0..1].
  • OnFlashlightOff <float>
Fired when the player turns off his flashlight. This output has the value of how much energy the player had when this happened [0..1].
  • PlayerHealth <integer>
The player's current health value.
  • PlayerHasAmmo
Fired by request if the player has any ammo.
  • PlayerHasNoAmmo
Fired by request if the player doesn't have any ammo.
Fired when if player fired an AR2 combine ball that didn't kill any enemies.
Fires when the player dies.