player
This entity is not in the stock FGD files by default.
|
Code classes:
CBasePlayer
(all games)CHL2_Player
- DM
CHL2MP_Player
CPortal_Player
- DM
CBaseMultiplayerPlayer
CPortal_Player
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
(models)CBaseEntity
(all ents)
player
is a point entity present in all Source games. This entity represents the player(s) in every Source game.
Important: Make sure to never remove a player
entity by any means. The associated player will not be able to do anything and will likely crash.
Note: The special infected are also player
s (except for witch
es). This decision could have been made to streamline coding for Versus mode. For common infected, see infected
. To detect a certain special infected, use filter_activator_infected_class
.
Note: The player
entity actually sends all its player input to an asw_marine
entity which represents the actual characters in the game, like a puppet. This might have something to do with the fact that players can switch characters mid-game.
Note: In multiple games, ent_text
will report that your player
targetname matches your Steam username. This is not actually happening (it would be very easy to exploit).
Note: Bots are considered cs_bot
s by some parts of code, but are considered player
s by other parts.
Note: Parenting objects to a player
tends to result in odd movement. logic_measure_movement
is a good workaround.
Inputs[edit | edit source]
- SetHealth
<integer>
- Sets the player's Health
(health)
. - SetHUDVisibility
<boolean>
- Sets if the HUD is visible or not.
- SetFogController
<target_destination>
- Makes this player use fog settings from a specified
env_fog_controller
. - HandleMapEvent
<string>
(only available in ) - To do: Description. Not in the 2013 SDK.
- IgnoreFallDamage
<float>
(only available in ) - Makes the player immune to fall damage for the specified number of seconds. If they fall from a height that would normally cause fall damage, they will become vulnerable to fall damage immediately after it.
- IgnoreFallDamageWithoutReset
<float>
(only available in ) - Makes the player immune to absolutely all fall damage for the specified number of seconds.
- OnSquadMemberKilled (only available in )
- Tells the player that a squad member has died. Their associated HUD element will get removed. This is not an output.[Confirmed]
- DisableFlashlight (only available in )
- Turns off and prevents the player flashlight from working.
- EnableFlashlight (only available in )
- Re-enables the player flashlight.
- ForceDropPhysObjects (only available in )
- Makes the player drop any object being held, whether its with
+use
or the gravity gun. - OnRescueZoneTouch (only available in )
- To do: Tells the player that they rescued a hostage? Appears to do nothing. This is not an output.[Confirmed]
- IgnitePlayer
<integer>
(only available in ) - This input used to set players on fire for the specified number of seconds. Since the Jungle Inferno update, it has only caused fire-related sounds (e.g. pain sounds) to play.
- SetCustomModel
<model>
(only available in ) - Changes the model the player appears as. The player will lose all animations, and their weapon models and
tf_wearable
models will float in the air. The only way to set the model back to normal seems to be to force a class change. - SetCustomModelOffset
<vector>
(only available in ) - If the player has a model set with SetCustomModel, this provides an offset that will move the model certain XYZ distances from the origin.
- SetCustomModelRotation
<vector>
(only available in ) - Sets the player model to a specific Pitch Yaw and Roll. This may cause the model to stop rotating as the player looks around.
- ClearCustomModelRotation (only available in )
- If the player has a model set with SetCustomModel, this will clear any custom rotation and make the model rotate to follow the player's eyes.
- SetCustomModelRotates
<boolean>
(only available in ) - If the player has a model set with SetCustomModel, this will set if that model is allowed to rotate to follow the player's eyes.
- SetCustomModelVisibleToSelf
<boolean>
(only available in ) - If the player has a model set with SetCustomModel, this will set if that model is visible to that player, if they're in thirdperson view.
- SetForcedTauntCam
<boolean>
(only available in ) - 1 makes the player go into thirdperson. 0 will force the player back to firstperson, unless they were using the
thirdperson
console command. - ExtinguishPlayer (only available in )
- If the player was set on fire via normal means (such as a flamethrower, not the Ignite input), this input extinguishes them.
- BleedPlayer
<integer>
(only available in ) - Makes the player bleed for the specified number of seconds.
- TriggerLootIslandAchievement (only available in )
- This input is fired on
koth_lakeside_event
when the player touches the caged skull on the loot island. It apparently causes an achievement to be unlocked, in normal gameplay. - TriggerLootIslandAchievement2 (only available in )
- This input is fired on
koth_lakeside_event
when the player touches the caged skull on the loot island. It apparently causes an achievement to be unlocked, in normal gameplay. - SpeakResponseConcept
<string>
(only available in ) - Makes the player speak a response concept. Example:
halloweenlongfall
. To do: Make a full list for tf2 and l4d2? See the script files inscripts/talker/
. - RollRareSpell (only available in )
- Makes the player roll for a random rare-tier spell. The map must have spells already on it for this input to work.
- RoundSpawn (only available in )
- Tells the player entity that a new round has begun. Doesn't have any visible effect it seems.
- SetCommentaryStatueMode
<boolean>
(only available in ) - Intended for freezing zombies when in developer commentary mode. Survivor HUDs and health can become bugged if sent this input.
- DisableLedgeHang (only available in )
- Makes the player unable to hang onto ledges (which requires a teammate to help them up). Instead, they will walk straight off the edge.
- EnableLedgeHang (only available in )
- Lets the player hang onto ledges again.
- TeleportToSurvivorPosition
<target_destination>
(only available in ) - Teleports the player to the specified
info_survivor_position
and freezes them there. - ReleaseFromSurvivorPosition (only available in )
- Lets the player move freely again if they were forced to stand at an
info_survivor_position
. - SetGlowEnabled
<boolean>
(only available in ) - Sets if this player is allowed to glow through walls if not visible.
- RemoveWeaponUpgrades (only available in )
- Removes laser sights from guns.
- CancelCurrentScene (only available in )
- Makes the player's character quit talking immediately.