Player: Difference between revisions
Jump to navigation
Jump to search
Note:This entity is not listed in the FGD, and is not intended to be placed in a map at all.
Note:Keyvalues, inputs and outputs vary depending on game and engine version.
Warning:Placing a player entity in a map will result in an instant fatal error on map load!
Note:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history
Note:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history
No edit summary |
(Overhauled the page.) |
||
Line 3: | Line 3: | ||
{{base point|player}} The player itself. This entity still exists even if the player is dead. A pointer to the player can be acquired by using <code>UTIL_GetLocalPlayer()</code>. | {{base point|player}} The player itself. This entity still exists even if the player is dead. A pointer to the player can be acquired by using <code>UTIL_GetLocalPlayer()</code>. | ||
{{Note|This entity is not listed in the FGD, and is not intended to be placed in a map | {{Note|This entity is not listed in the FGD, and is not intended to be placed in a map at all.}} | ||
{{Note| | {{Note|Keyvalues, inputs and outputs vary depending on game and engine version.}} | ||
{{Warning|Placing a player entity in a map will result in an instant fatal error on map load!}} | {{Warning|Placing a player entity in a map will result in an instant fatal error on map load!}} | ||
== Keyvalues == | == Keyvalues == | ||
{{KV|health|integer|The player's health.}} | {{KV|Health (health)|integer|The player's health.}} | ||
{{KV|max_health|integer|The value of "health" cannot exceed this.}} | {{KV|Maximum Health (max_health)|integer|The value of "health" cannot exceed this.}} | ||
{{KV | {{KV|ModelIndex|integer|Changes the player's model to a precached model on the map. Not available in {{tf2}}.}} | ||
{{ | {{KV BaseEntity}} | ||
{{KV | |||
== Inputs == | == Inputs == | ||
{{IO|SetHealth|param=integer|Sets the player's health. Values clamped between 0 and max_health.}} | {{IO|SetHealth|param=integer|Sets the player's health. Values clamped between 0 and <code>max_health</code>.}} | ||
{{IO|SetHUDVisibility|param=boolean|Hides or displays the HUD.}} | {{IO|HandleMapEvent|param=string|Tells the game to perform a function, such as unlock an achievement. Hardcoded for specific map names.}} | ||
{{IO|SetFogController|param=string| | {{IO|SetHUDVisibility|param=boolean|Hides or displays the HUD. Not available in {{hl2}} series.}} | ||
{{IO|IgnoreFallDamage|param=float|Prevent the player from taking fall damage for [n] seconds, but reset back to taking fall damage after the first impact (so players will be hurt if they bounce off what they hit).}} | :{{note|The menu can still be accessed, and some HUD elements such as kill-icons may still be visible.}} | ||
{{IO|IgnoreFallDamageWithoutReset|param=float|Absolutely prevent the player from taking fall damage for [n] seconds.}} | {{IO|SetFogController|param=string|Sets the [[env_fog_controller|fog controller]] to use for the [[!activator]]. Not available in {{hl2}} series.}} | ||
{{IO|OnSquadMemberKilled|Notification of a player's | {{IO|IgnoreFallDamage|param=float|{{hl2}} Prevent the player from taking fall damage for [n] seconds, but reset back to taking fall damage after the first impact (so players will be hurt if they bounce off what they hit).}} | ||
{{IO|DisableFlashlight|Disables the player's flashlight.}} | {{IO|IgnoreFallDamageWithoutReset|param=float|{{hl2}} Absolutely prevent the player from taking fall damage for [n] seconds.}} | ||
{{IO|EnableFlashlight|Enables the player's flashlight.}} | {{IO|OnSquadMemberKilled|{{hl2}} Notification of a player's [[NPC]] ally in the players squad being killed.}} | ||
{{IO|ForceDropPhysObjects|Force the player to drop any physics objects | {{IO|DisableFlashlight|{{hl2}} Disables the player's flashlight.}} | ||
{{IO|SpeakResponseConcept|param=string|Speak the specified [[Response System|response concept]] immediately.}} | {{IO|EnableFlashlight|{{hl2}} Enables the player's flashlight.}} | ||
{{IO|ForceDropPhysObjects|{{hl2}} Force the player to drop any [[prop_physics|physics objects]] they are carrying.}} | |||
{{IO|SpeakResponseConcept|param=string|Speak the specified [[Response System|response concept]] immediately. Not available in {{hl2}} series.}} | |||
{{IO|OnRescueZoneTouch|{{css}}{{csgo}} Fired when a [[hostage_entity|hostage]] is rescued. This input is also available in the code for {{l4d}} and {{l4d2}}.}} | |||
{{IO|SetCommentaryStatueMode|{{l4d}} {{todo}}.}} | |||
{{IO|DisableLedgeHang|{{l4d2}} Disable ledge hanging by player.}} | {{IO|DisableLedgeHang|{{l4d2}} Disable ledge hanging by player.}} | ||
{{IO|EnableLedgeHang|{{l4d2}} Enable ledge hanging by player.}} | {{IO|EnableLedgeHang|{{l4d2}} Enable ledge hanging by player.}} | ||
{{IO|SetCustomModel|param=string|{{tf2}} Set a custom player model}} | {{IO|IgnitePlayer|param=integer|{{tf2}} Ignites the player with a specified lifetime and causes a reaction (sound and speech).}} | ||
{{IO|SetCustomModelOffset|param=vector|{{tf2}} Set a custom player model | :{{note|Does not fire the <code>OnIgnite</code> output.}} | ||
{{IO|SetCustomModelRotation|param=vector|{{tf2}} Set a custom player model | :{{bug|Broken since the [https://wiki.teamfortress.com/wiki/Jungle_Inferno_Update Jungle Inferno] update, only initiates sound and speech but no actual fire. Use [[trigger_ignite]] as a workaround.}} | ||
{{IO|SetCustomModelRotates|param=boolean|{{tf2}} Set if | {{IO|ExtinguishPlayer|{{tf2}} Extinguishes the player.}} | ||
{{IO|SetCustomModelVisibleToSelf|param=boolean|{{tf2}} Set if | {{IO|BleedPlayer|param=integer|{{tf2}} Bleeds the player with a specified length.}} | ||
{{IO| | {{IO|RollRareSpell|{{tf2}} Forces the player to roll a rare spell. Only available if spells are enabled on the map.}} | ||
{{ | {{IO|SetCustomModel|param=string|{{tf2}} Set a custom player model ''without'' animations.}} | ||
{{I | {{IO|SetCustomModelOffset|param=vector|{{tf2}} Set a custom player model position on the player.}} | ||
{{I | {{IO|SetCustomModelRotation|param=vector|{{tf2}} Set a custom player model rotation on the player.}} | ||
{{IO|ClearCustomModelRotation|{{tf2}} Clears the custom player model rotation.}} | |||
{{IO|SetCustomModelRotates|param=boolean|{{tf2}} Set if the custom model rotates or not to the player's angles.}} | |||
{{IO|SetCustomModelVisibleToSelf|param=boolean|{{tf2}} Set if the custom model is visible to the player, in thirdperson.}} | |||
{{IO|SetForcedTauntCam|param=boolean|{{tf2}} Forces the player into thirdperson mode.}} | |||
{{IO|SpeakResponseConcept|param=string|{{tf2}} Forces the player to speak the specified response concept, an example being <code>halloweenlongfall</code>.}} | |||
{{IO|TriggerLootIslandAchievement|{{tf2}} {{todo}}.}} | |||
{{IO|TriggerLootIslandAchievement2|{{tf2}} {{todo}}.}} | |||
{{IO|RoundSpawn|{{tf2}} {{todo}}.}} | |||
{{I BaseEntity}} | |||
{{I BaseAnimating}} | |||
== Outputs == | == Outputs == | ||
{{O | {{O BaseEntity|l4d=1}} | ||
{{O | {{O BaseAnimating}} |
Revision as of 16:23, 20 October 2018
Template:Base point The player itself. This entity still exists even if the player is dead. A pointer to the player can be acquired by using UTIL_GetLocalPlayer()
.



Keyvalues
- Maximum Health (max_health) ([todo internal name (i)]) <integer>
- The value of "health" cannot exceed this.
- ModelIndex ([todo internal name (i)]) <integer>
- Changes the player's model to a precached model on the map. Not available in
.
Inputs
- SetHealth <integer >
- Sets the player's health. Values clamped between 0 and
max_health
.
- HandleMapEvent <string >
- Tells the game to perform a function, such as unlock an achievement. Hardcoded for specific map names.
- SetHUDVisibility <boolean >
- Hides or displays the HUD. Not available in
series.
Note:The menu can still be accessed, and some HUD elements such as kill-icons may still be visible.
- SetFogController <string >
- Sets the fog controller to use for the !activator. Not available in
series.
- IgnoreFallDamage <float >
Prevent the player from taking fall damage for [n] seconds, but reset back to taking fall damage after the first impact (so players will be hurt if they bounce off what they hit).
- IgnoreFallDamageWithoutReset <float >
Absolutely prevent the player from taking fall damage for [n] seconds.
- OnSquadMemberKilled
Notification of a player's NPC ally in the players squad being killed.
- ForceDropPhysObjects
Force the player to drop any physics objects they are carrying.
- SpeakResponseConcept <string >
- Speak the specified response concept immediately. Not available in
series.
- OnRescueZoneTouch
Fired when a hostage is rescued. This input is also available in the code for
and
.
- IgnitePlayer <integer >
Ignites the player with a specified lifetime and causes a reaction (sound and speech).
Note:Does not fire the
OnIgnite
output.Bug:Broken since the Jungle Inferno update, only initiates sound and speech but no actual fire. Use trigger_ignite as a workaround. [todo tested in ?]
- BleedPlayer <integer >
Bleeds the player with a specified length.
- RollRareSpell
Forces the player to roll a rare spell. Only available if spells are enabled on the map.
- SetCustomModel <string >
Set a custom player model without animations.
- SetCustomModelOffset <vector >
Set a custom player model position on the player.
- SetCustomModelRotation <vector >
Set a custom player model rotation on the player.
- SetCustomModelRotates <boolean >
Set if the custom model rotates or not to the player's angles.
- SetCustomModelVisibleToSelf <boolean >
Set if the custom model is visible to the player, in thirdperson.
- SetForcedTauntCam <boolean >
Forces the player into thirdperson mode.
- SpeakResponseConcept <string >
Forces the player to speak the specified response concept, an example being
halloweenlongfall
.

Outputs
