logic_playerproxy
		
		
		
		Jump to navigation
		Jump to search
		
| CLogicPlayerProxy | 
logic_playerproxy  is a   logical entity  available in 
 Half-Life 2 series, 
 Portal series, 
 Alien Swarm, 
 Counter-Strike: Global Offensive, and 
 Black Mesa.
It is used to relay inputs/outputs to the player and back to the world.
- In Orange Box games and Portal 2, outputs will fire correctly, with the player that triggered the output as the !activator.
 - In Orange Box games, inputs will affect the most recently connected player.
 - In Portal 2, inputs will do nothing and produce the console message 
Can't use logic player proxy in multiplayer!(which is slightly erroneous, as outputs still work as mentioned previously). - In Alien Swarm and CS:GO (which are multiplayer only), the entity does not function at all.
 
Keyvalues
- Name (targetname) <string>[ Edit ]
 - The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. 
parentnameortarget).
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>
 - Damage filter that also needs to be passed when player takes damage
 
Inputs
DamageFilter:
- SetDamageFilter <string>
 - Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.
 


 Half-Life 2, HL2 Episodes, Portal and Black Mesa
- 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 <integer>
 - Sets the player's health to this value.
 
- RequestAmmoState
 - Request the ammo state of the player. It will fire PlayerHasAmmo or PlayerHasNoAmmo outputs.
 
- EnableCappedPhysicsDamage
 - Cause player to take less damage from physics objects, and never more than 30 points from any individual strike.
 
- DisableCappedPhysicsDamage
 - Undo effects of EnableCappedPhysicsDamage
 

 Half-Life 2, HL2 Episodes and Portal
- LowerWeapon
 - Lowers the players weapon.
 
- SetLocatorTargetEntity  <string> (only in 
) - Set the entity that the HUD locator should track. (Usually a vehicle)
 
Note:Also works in Episode One since Source 2007, if the resources are ported.
- SuppressCrosshair   (only in 
) !FGD - Hides the crosshair.
 
Note:Unlike the command crosshair 0, the crosshair is enabled again when a new game is started or a save made before firing the input is loaded.
Note:Added in the March 3rd, 2010 update. Seems to be a backported Portal 2 input that was removed from Portal 2 before release.
- OnPlayerStartedGame   (only in 
) !FGD - Indicates that the player started the game from the beginning and leaderboard stats should be tracked.
 
- OnPlayerBeatGame   (only in 
) !FGD - Saves the current time, portal, and step scores to the leaderboard if OnPlayerStartedGame was fired previously.
 
 Portal 2
- AddPotatosToPortalgun
 - Change portalgun bodygroup to show PotatOS.
 
- RemovePotatosFromPortalgun
 - Change portalgun bodygroup to not show PotatOS.
 
- SetDropEnabled
 - Set whether the player is allowed to drop a carried object.
 
- ForceVMGrabController
 - Force the player to use the view model grab controller for all objects that are picked up.
 
- ForcePhysicsGrabController
 - Force the player to use the physics grab controller for all objects that are picked up.
 
- ResetGrabControllerBehavior
 - Resets the grab controller used by the player to its default behavior.
 
- SetMotionBlurAmount <float>
 - Forces the motion blur effect on the player. Set to <= 0 to disable this override.
 
- PaintPlayerWithPortalPaint !FGD
 - Displays a Conversion Gel splashing effect on the player's screen.
 
 
 
 
 
 
 
  | 
Outputs


 Half-Life 2, HL2 Episodes, Portal and Black Mesa
- PlayerDied
 - Fires when the player dies.
 
- PlayerHealth <integer>
 - Outputs the player's current health value.
 
- OnFlashlightOn <float>
 - Fired when the player turns on their 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 their flashlight. This output has the value of how much energy the player had when this happened [0..1].
 
- PlayerHasAmmo
 - Fired by request if the player has any ammo.
 
- PlayerHasNoAmmo
 - Fired by request if the player doesn't have any ammo.
 


 Portal 2, Counter-Strike Global Offensive and Black Mesa
- OnDuck
 - Fired when a player starts to duck.
 
- OnUnDuck
 - Fired when a player releases the duck button.
 
- OnJump
 - Fired when a player jumps.
 
Bug:These are technically in Counter-Strike: Global Offensive and Black Mesa, but don't work.
 Portal 2
- OnPrimaryPortalPlaced
 - Fired when a Portal player successfully places the primary portal.
 
- OnSecondaryPortalPlaced
 - Fired when a Portal player successfully places the secondary portal.
 
- OnCoopPing !FGD
 - Fired in response to the unused 
+coop_pingcommand. Normal pings do not fire this output; use info_player_ping_detector instead. 
External links
Map example .VMF (Checks player health) - By RabidMonkey
Map example .VMF and .BSP (Checks if player died and dissolves ragdoll) - By Jora
Categories: 
- CServerOnlyEntity
 - Logical entities
 - Half-Life 2 series entities
 - Half-Life 2 series logical entities
 - Portal series entities
 - Portal series logical entities
 - Alien Swarm entities
 - Alien Swarm logical entities
 - Counter-Strike: Global Offensive entities
 - Counter-Strike: Global Offensive logical entities
 - Black Mesa entities
 - Black Mesa logical entities
 - Pages with uncategorized bugs
 - IO System