Logic playerproxy: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added OrangeBox stuff, I think...)
(Cleanup and added new inputs / outputs)
Line 1: Line 1:
{{wrongtitle|title=logic_playerproxy}}
{{base point ep1|logic_playerproxy}}
{{base_point_ep1}}


== Entity description ==
== Entity description ==
Line 6: Line 5:


== Keyvalues ==
== Keyvalues ==
* {{KV Targetname}}
{{KV Targetname}}
{{KV DamageFilter}}


== Inputs ==
== Inputs ==
* {{I Targetname}}
{{IO|RequestPlayerHealth|Requests the current player's health from the proxy. This will fire the PlayerHealth output with the value.}}
* '''SetFlashlightSlowDrain'''
{{IO|SetFlashlightSlowDrain|Puts the player's flashlight in slow-power-drain mode (for Episodic darkness)}}
: Puts the player's flashlight in slow-power-drain mode (for Episodic darkness)
{{IO|SetFlashlightNormalDrain|Puts the player's flashlight to default power drain}}
* '''SetFlashlightNormalDrain'''
{{IO|SetPlayerHealth|Sets the player's health to this value.|param=integer}}
: Puts the player's flashlight to default power drain
{{IO|RequestAmmoState|Request the ammo state of the player. It will fire PlayerHasAmmo or PlayerHasNoAmmo outputs.}}
* '''SetPlayerHealth <integer>'''
{{IO|LowerWeapon|Lowers the players weapon.|since=EP2}}
: Sets the player's health to this value.
{{IO|EnableCappedPhysicsDamage|Cause player to take less damage from physics objects, and never more than 30 points from any individual strike.|since=EP2}}
* '''RequestAmmoState'''
{{IO|DisableCappedPhysicsDamage|Undo effects of EnableCappedPhysicsDamage|since=EP2}}
: Request the ammo state of the player. It will fire PlayerHasAmmo or PlayerHasNoAmmo outputs.
{{IO|SetLocatorTargetEntity|Set the entity that the HUD locator should track. (Usually a vehicle)|param=string|since=EP2}}
* '''RequestPlayerHealth'''
{{IO|AddPotatosToPortalgun|Change portalgun bodygroup to show potatos.|since=P2}}
: Requests the current player's health from the proxy. This will fire the PlayerHealth output with the value.
{{IO|RemovePotatosFromPortalgun|Change portalgun bodygroup to not show potatos.|since=P2}}
* '''{{EP2 add|LowerWeapon}}'''
{{IO|SetDropEnabled|Set wether the player is allowed to drop a carried object.|param=bool|since=P2}}
: Lowers the player's weapon.
{{IO|ForceVMGrabController|Force the player to use the view model grab controller for all objects that are picked up.|since=P2}}
* '''{{EP2 add|EnableCappedPhysicsDamage}}'''
{{IO|ForcePhysicsGrabController|Force the player to use the physics grab controller for all objects that are picked up.|since=P2}}
: Causes player to take less damage from physics objects, and never more than 30 points from any individual strike.
{{IO|ResetGrabControllerBehavior|Resets the grab controller used by the player to its default behavior.|since=P2}}
* '''{{EP2 add|DisableCappedPhysicsDamage}}'''
{{IO|SetMotionBlurAmount|Forces the motion blur effect on the player. Set to < 0 to disable this override.|param=float|since=P2}}
: Undoes EnableCappedPhysicsDamage.
{{I Targetname}}
*'''{{EP2 add|SetLocatorTargetEntity <target_destination>}}'''
{{I DamageFilter}}
: Sets the entity that the HUD locator should track. (Usually a vehicle).


== Outputs ==
== Outputs ==
* {{O Targetname}}
{{IO|OnFlashlightOn|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].|param=float}}
* '''OnFlashlightOn <float>'''
{{IO|OnFlashlightOff|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].|param=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].
{{IO|PlayerHealth|The player's current health value.|param=integer}}
* '''OnFlashlightOff <float>'''
{{IO|PlayerHasAmmo|Fired by request if the player has any ammo.}}
: 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].
{{IO|PlayerHasNoAmmo|Fired by request if the player doesn't have any ammo.}}
* '''PlayerHealth <integer>'''
{{IO|PlayerMissedAR2AltFire|Player fired an AR2 combine ball that didn't kill any enemies.|since=EP2}}
: The player's current health value.
{{IO|PlayerDied|Fires when the player dies.|since=EP2}}
* '''PlayerHasAmmo'''
{{IO|OnStartSlowingTime|Fired when a Portal player initiates slow time.|since=AS}}
: Fired by request if the player has any ammo.
{{IO|OnStopSlowingTime|Fired when a Portal player stops slowing time.|since=AS}}
* '''PlayerHasNoAmmo'''
{{IO|OnPrimaryPortalPlaced|Fired when a Portal player successfully places the primary portal.|since=P2}}
: Fired by request if the player doesn't have any ammo.
{{IO|OnSecondaryPortalPlaced|Fired when a Portal player successfully places the secondary portal.|since=P2}}
* '''{{EP2 add|PlayerMissedAR2AltFire}}'''
{{IO|OnDuck|Fired when a player starts to duck.|since=P2}}
: Fired when if player fired an AR2 combine ball that didn't kill any enemies.
{{IO|OnUnDuck|Fired when a player releases the duck button.|since=P2}}
* '''{{EP2 add|PlayerDied}}'''
{{IO|OnJump|Fired when a player jumps.|since=P2}}
: Fires when the player dies.
{{O Targetname}}

Revision as of 23:51, 8 June 2011

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

DamageFilter:

Damage Filter (damagefilter) <targetname>
Name of the filter_damage_type entity that controls which entities can damage us.


Inputs

RequestPlayerHealth
Requests the current player's health from the proxy. This will fire the PlayerHealth output with the value.
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 <integerRedirectInput/integer>
Sets the player's health to this value.
RequestAmmoState
Request the ammo state of the player. It will fire PlayerHasAmmo or PlayerHasNoAmmo outputs.
LowerWeapon  (in all games since Half-Life 2: Episode Two)
Lowers the players weapon.
EnableCappedPhysicsDamage  (in all games since Half-Life 2: Episode Two)
Cause player to take less damage from physics objects, and never more than 30 points from any individual strike.
DisableCappedPhysicsDamage  (in all games since Half-Life 2: Episode Two)
Undo effects of EnableCappedPhysicsDamage
SetLocatorTargetEntity <stringRedirectInput/string> (in all games since Half-Life 2: Episode Two)
Set the entity that the HUD locator should track. (Usually a vehicle)
AddPotatosToPortalgun  (in all games since Portal 2)
Change portalgun bodygroup to show potatos.
RemovePotatosFromPortalgun  (in all games since Portal 2)
Change portalgun bodygroup to not show potatos.
SetDropEnabled <booleanRedirectInput/boolean> (in all games since Portal 2)
Set wether the player is allowed to drop a carried object.
ForceVMGrabController  (in all games since Portal 2)
Force the player to use the view model grab controller for all objects that are picked up.
ForcePhysicsGrabController  (in all games since Portal 2)
Force the player to use the physics grab controller for all objects that are picked up.
ResetGrabControllerBehavior  (in all games since Portal 2)
Resets the grab controller used by the player to its default behavior.
SetMotionBlurAmount <floatRedirectInput/float> (in all games since Portal 2)
Forces the motion blur effect on the player. Set to < 0 to disable this override.

DamageFilter:

SetDamageFilter <stringRedirectInput/string>
Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.

Outputs

OnFlashlightOn <floatRedirectInput/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 <floatRedirectInput/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 <integerRedirectInput/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  (in all games since Half-Life 2: Episode Two)
Player fired an AR2 combine ball that didn't kill any enemies.
PlayerDied  (in all games since Half-Life 2: Episode Two)
Fires when the player dies.
OnStartSlowingTime  (in all games since Alien Swarm)
Fired when a Portal player initiates slow time.
OnStopSlowingTime  (in all games since Alien Swarm)
Fired when a Portal player stops slowing time.
OnPrimaryPortalPlaced  (in all games since Portal 2)
Fired when a Portal player successfully places the primary portal.
OnSecondaryPortalPlaced  (in all games since Portal 2)
Fired when a Portal player successfully places the secondary portal.
OnDuck  (in all games since Portal 2)
Fired when a player starts to duck.
OnUnDuck  (in all games since Portal 2)
Fired when a player releases the duck button.
OnJump  (in all games since Portal 2)
Fired when a player jumps.