logic_playerproxy is an existing point entity available with all versions of Mapbase.

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



KeyValues

- Max Input Armor (SetMaxInputArmor) <integer>
Sets the maximum armor a player can receive from the AddArmor, RemoveArmor, and SetArmor inputs. This does NOT override how much armor a player can receive overall!
- Suit Zoom FOV (SetSuitZoomFOV) <integer>
Sets the FOV value the player's suit zoom function should use.
- Response Contexts (ResponseContext) <string>
Response system context(s) for the player. Format should be: 'key:value,key2:value2,etc'. Using inputs like AddContext on this player proxy will not carry it over to the player and should be done on the '!player' entity instead.
- Hide squad HUD (HideSquadHUD) <choices>
Hides the player's squad status HUD above the ammo display.
- Hands Viewmodel (HandsVM) <studio>
Custom hands viewmodel. Requires weapon viewmodels that support them.
- Hands Viewmodel Skin (HandsVMSkin) <string>
Skin for the custom hands viewmodel.
- Hands Viewmodel Bodygroup (HandsVMBody) <string>
Bodygroup value for the custom hands viewmodel.
- Protagonist Name (ProtagonistName) <string>
Sets the player to a specific protagonist from scripts/protagonists/protagonists_manifest.txt. [Currently HL2 only]

Inputs

- RequestPlayerArmor <void>
Requests the current player's armor from the proxy. This will fire the PlayerArmor output with the value.
- RequestPlayerAuxPower <void>
Requests the current player's auxiliary power from the proxy. This will fire the PlayerAuxPower output with the value.
- RequestPlayerFlashBattery <void>
Requests the current player's current flashlight battery from the proxy. This will fire the PlayerFlashBattery output with the value. NOTE: If legacy flashlight is enabled (aux power flashlight), this will return the player's current auxiliary power.
- GetAmmoOnWeapon <string>
Requests the amount of ammo on the specified weapon, if the player has it. Fires OnGetAmmo with the amount. This has a few quirks: Fires with secondary ammo if the classname starts with '@' at the beginning. (e.g. @weapon_smg1) Uses the player's active weapon if the parameter is null. Use '@' to get secondary ammo on the active weapon. Does not fire if the player does not have the specified weapon.
- SetHandModel <string>
Sets the player's hands viewmodel.
- SetHandModelSkin <integer>
Sets the skin of the player's hands viewmodel.
- SetHandModelBodyGroup <integer>
Sets the bodygroup of the player's hands viewmodel.
- SetPlayerDrawLegs <bool>
Sets whether the player should draw its model beneath the camera.
- SetPlayerDrawExternally <bool>
Sets whether the player should show up in mirrors, cameras, etc.
- SetMaxInputArmor <integer>
Sets the maximum armor value that could be set by armor inputs.
- SetSuitZoomFOV <integer>
Sets the FOV used by suit zoom.
- SetProtagonist <string>
Sets the player's protagonist entry.

Outputs

- PlayerArmor <integer>
The player's current armor value, fired in response to RequestPlayerArmor.
- PlayerAuxPower <float>
The player's current auxiliary power value, fired in response to RequestPlayerArmor.
- PlayerFlashBattery <float>
The player's current flashlight battery percentage, fired in response to RequestPlayerFlashBattery.
- OnGetAmmo <integer>
Fires in response to GetAmmoOnWeapon with the weapon's ammo amount.
- OnSquadMemberKilled <void>
Fires when a member of the player's squad dies. Fires with this member as the activator.
- PlayerDamaged <void>
Fires when the player is damaged.
- OnPlayerSpawn <void>
Fired when the player spawns or respawns, using the spawn point as the caller.