logic_playerproxy

From Valve Developer Community

Jump to: navigation, search

This Point-based Entity is available in all Source Games using the Episode 1 Engine.

Contents

Entity description

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

Keyvalues

  • Targetname:

Name <string>
The targetname other entities refer to this entity by.

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.
  • 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.
  • LowerWeapon (New with Orange Box)
Lowers the player's weapon.
  • EnableCappedPhysicsDamage (New with Orange Box)
Causes player to take less damage from physics objects, and never more than 30 points from any individual strike.
  • DisableCappedPhysicsDamage (New with Orange Box)
Undoes EnableCappedPhysicsDamage.
  • SetLocatorTargetEntity <target_destination> (New with Orange Box)
Sets the entity that the HUD locator should track. (Usually a vehicle).

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.
  • 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.
  • PlayerMissedAR2AltFire (New with Orange Box)
Fired when if player fired an AR2 combine ball that didn't kill any enemies.
  • PlayerDied (New with Orange Box)
Fires when the player dies.
Personal tools