From Valve Developer Community
Revision as of 20:32, 26 September 2019 by Loudslappingsounds (fixed availability stuff. you know, these tagline templates could be condensed by a considerable degree.)
logic_playerproxy is a point entity available in the following Source engine games: Half-Life 2, Portal, Alien Swarm, Portal 2, Counter-Strike: Global Offensive. It is used to relay inputs/outputs to the player and back to the world.
- Entity Scripts
- Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
- Script think function
- Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call. Note:Try to avoid expensive operations in this function, as it may cause performance problems.
- Requests the current player's health from the proxy. This will fire the PlayerHealth output with the value.
- Puts the player's flashlight in slow-power-drain mode (for Episodic darkness)
- Puts the player's flashlight to default power drain
- Sets the player's health to this value.
- Request the ammo state of the player. It will fire PlayerHasAmmo or PlayerHasNoAmmo outputs.
LowerWeapon(New with Half-Life 2: Episode Two / Source 2007)
- Lowers the players weapon.
EnableCappedPhysicsDamage(New with Half-Life 2: Episode Two / Source 2007)
- Cause player to take less damage from physics objects, and never more than 30 points from any individual strike.
DisableCappedPhysicsDamage(New with Half-Life 2: Episode Two / Source 2007)
- Undo effects of EnableCappedPhysicsDamage
<string>(New with Half-Life 2: Episode Two / Source 2007)
- Set the entity that the HUD locator should track. (Usually a vehicle)
SuppressCrosshair(New with Source 2009) !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.
AddPotatosToPortalgun(New with Portal 2)
- Change portalgun bodygroup to show PotatOS.
RemovePotatosFromPortalgun(New with Portal 2)
- Change portalgun bodygroup to not show PotatOS.
<boolean>(New with Portal 2)
- Set wether the player is allowed to drop a carried object.
ForceVMGrabController(New with Portal 2)
- Force the player to use the view model grab controller for all objects that are picked up.
ForcePhysicsGrabController(New with Portal 2)
- Force the player to use the physics grab controller for all objects that are picked up.
ResetGrabControllerBehavior(New with Portal 2)
- Resets the grab controller used by the player to its default behavior.
<float>(New with Portal 2)
- Forces the motion blur effect on the player. Set to <= 0 to disable this override.
- Removes this entity from the world.
- Removes this entity and its children from the world. Note:Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than
- Adds a keyvalue/output to this entity. It can be potentially very dangerous, use with care.
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
- Fire the
OnUseroutputs; see User Inputs and Outputs.
- Same as a player invoking +use; may not do anything depending on the entity. Can also be invoked by firing an output that does not specify an input.
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
- Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. Bug: In , the code is executed in the script scope of the entity that fires the output, not the one receiving the input.Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
- Execute a VScript function in the scope of the receiving entity.
- Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
- Set this entity's angles.
- 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].
- 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].
- The player's current health value.
- Fired by request if the player has any ammo.
- Fired by request if the player doesn't have any ammo.
PlayerMissedAR2AltFire(New with Half-Life 2: Episode Two / Source 2007)
- Player fired an AR2 combine ball that didn't kill any enemies.
PlayerDied(New with Half-Life 2: Episode Two / Source 2007)
- Fires when the player dies.
OnStartSlowingTime(New with Alien Swarm)
- Fired when a Portal player initiates slow time.
OnStopSlowingTime(New with Alien Swarm)
- Fired when a Portal player stops slowing time.
OnPrimaryPortalPlaced(New with Portal 2)
- Fired when a Portal player successfully places the primary portal.
OnSecondaryPortalPlaced(New with Portal 2)
- Fired when a Portal player successfully places the secondary portal.
OnDuck(New with Portal 2)
- Fired when a player starts to duck.
OnUnDuck(New with Portal 2)
- Fired when a player releases the duck button.
OnJump(New with Portal 2)
- Fired when a player jumps.
- These outputs each fire in response to the firing of the like-numbered
FireUser4Input; see User Inputs and Outputs.
- This output fires when the entity is killed and removed from the game.