player
Jump to navigation
Jump to search
Class hierarchy |
---|
CTFPlayer |
player
is an entity available in Team Fortress 2. The player itself or a bot. NPCs are not players. This entity still exists even if the player is dead.
Important:This is a preserved entity.
- On a new round entities with this classname will intentionally not reset. You can use logic_auto to emulate resetting it.
- Killing it removes it forever, as it is not respawned on a new round.
- It cannot be spawned with a point_template.
- Parenting this with non preserved entities may have undesirable effects.
Limitations/Bugs
Important:This entity is not intended to be placed in a map manually. Doing so will result in an instant fatal error on map load!
Inputs
- SetHealth <integer>
- Sets the player's health. Values clamped between 0 and
max_health
(the latter being normally set up for each individual class inscripts/playerclasses
).
- 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.
- Note:The menu can still be accessed, and some HUD elements such as kill-icons may still be visible.
- Warning:Will disable any weapon-switching of the target
- SetFogController <string>
- Sets the env_fog_controller to use.
- SpeakResponseConcept <string>
- Speak the specified response concept immediately. This is what's used to make players scream when falling into pits (using
HalloweenLongFall
response). Additional context can be passed using space-delimited key:value pairs. Example:TLK_MVM_TANK_CALLOUT IsMvMDefender:1 randomnum:100
. For a list of response rules, see the txt files inscripts/talker/
located intf2_misc
VPK.
List of Responses
- TLK_FIREWEAPON
- TLK_HURT
- TLK_PLAYER_EXPRESSION
- TLK_WINDMINIGUN
- TLK_FIREMINIGUN
- TLK_PLAYER_MEDIC
- TLK_DETONATED_OBJECT
- TLK_KILLED_PLAYER
- TLK_KILLED_OBJECT
- TLK_PLAYER_PAIN
- TLK_PLAYER_ATTACKER_PAIN
- TLK_PLAYER_TAUNT
- TLK_PLAYER_HELP
- TLK_PLAYER_GO
- TLK_PLAYER_MOVEUP
- TLK_PLAYER_LEFT
- TLK_PLAYER_RIGHT
- TLK_PLAYER_YES
- TLK_PLAYER_NO
- TLK_PLAYER_INCOMING
- TLK_PLAYER_CLOAKEDSPY
- TLK_PLAYER_SENTRYAHEAD
- TLK_PLAYER_TELEPORTERHERE
- TLK_PLAYER_DISPENSERHERE
- TLK_PLAYER_SENTRYHERE
- TLK_PLAYER_ACTIVATECHARGE
- TLK_PLAYER_CHARGEREADY
- TLK_PLAYER_TAUNTS
- TLK_PLAYER_BATTLECRY
- TLK_PLAYER_CHEERS
- TLK_PLAYER_JEERS
- TLK_PLAYER_POSITIVE
- TLK_PLAYER_NEGATIVE
- TLK_PLAYER_NICESHOT
- TLK_PLAYER_GOODJOB
- TLK_MEDIC_STARTEDHEALING
- TLK_MEDIC_CHARGEREADY
- TLK_MEDIC_STOPPEDHEALING
- TLK_MEDIC_CHARGEDEPLOYED
- TLK_FLAGPICKUP
- TLK_FLAGCAPTURED
- TLK_ROUND_START
- TLK_SUDDENDEATH_START
- TLK_ONFIRE
- TLK_STALEMATE
- TLK_BUILDING_OBJECT
- TLK_LOST_OBJECT
- TLK_SPY_SAPPER
- TLK_TELEPORTED
- TLK_LOST_CONTROL_POINT
- TLK_CAPTURED_POINT
- TLK_CAPTURE_BLOCKED
- TLK_HEALTARGET_STARTEDHEALINGING
- TLK_HEALTARGET_CHARGEREADY
- TLK_HEALTARGET_STOPPEDHEALINGING
- TLK_HEALTARGET_CHARGEDEPLOYEDYED
- TLK_MINIGUN_FIREWEAPON
- TLK_DIED
- TLK_PLAYER_THANKS
- TLK_CART_MOVING_FORWARD
- TLK_CART_MOVING_BACKWARD
- TLK_CART_STOP
- TLK_ATE_FOOD
- TLK_DOUBLE_JUMP
- TLK_DODGING
- TLK_DODGE_SHOT
- TLK_GRAB_BALL
- TLK_REGEN_BALL
- TLK_DEFLECTED
- TLK_BALL_MISSED
- TLK_STUNNED
- TLK_STUNNED_TARGET
- TLK_TIRED
- TLK_BAT_BALL
- TLK_ACHIEVEMENT_AWARD
- TLK_JARATE_HIT
- TLK_JARATE_LAUNCH
- TLK_HIGHFIVE_SUCCESS
- TLK_HIGHFIVE_SUCCESS_FULL
- TLK_HIGHFIVE_FAILURE
- TLK_HIGHFIVE_FAILURE_FULL
- TLK_PLAYER_TAUNT2
- TLK_PICKUP_BUILDING
- TLK_REDEPLOY_BUILDING
- TLK_CARRYING_BUILDING
- TLK_REQUEST_DUEL
- TLK_REJECT_DUEL
- TLK_DUEL_WAS_REJECTED
- TLK_ACCEPT_DUEL
- TLK_DUEL_WAS_ACCEPTED
- TLK_PLAYER_SHOW_ITEM_TAUNT
- TLK_TAUNT_REPLAY
- TLK_TAUNT_LAUGH
- TLK_TAUNT_HEROIC_POSE
- TLK_PARTNER_TAUNT_READY
- TLK_PLAYER_HOLDTAUNT
- TLK_TAUNT_PYRO_ARMAGEDDON
- TLK_ROCKET_DESTOYED
- TLK_MVM_BOMB_DROPPED
- TLK_MVM_BOMB_CARRIER_UPGRADE1DE1
- TLK_MVM_BOMB_CARRIER_UPGRADE2DE2
- TLK_MVM_BOMB_CARRIER_UPGRADE3DE3
- TLK_MVM_DEFENDER_DIED
- TLK_MVM_FIRST_BOMB_PICKUP
- TLK_MVM_BOMB_PICKUP
- TLK_MVM_SENTRY_BUSTER
- TLK_MVM_SENTRY_BUSTER_DOWN
- TLK_MVM_SNIPER_CALLOUT
- TLK_MVM_LAST_MAN_STANDING
- TLK_MVM_ENCOURAGE_MONEY
- TLK_MVM_MONEY_PICKUP
- TLK_MVM_ENCOURAGE_UPGRADE
- TLK_MVM_UPGRADE_COMPLETE
- TLK_MVM_GIANT_CALLOUT
- TLK_MVM_GIANT_HAS_BOMB
- TLK_MVM_GIANT_KILLED
- TLK_MVM_GIANT_KILLED_TEAMMATETE
- TLK_MVM_SAPPED_ROBOT
- TLK_MVM_CLOSE_CALL
- TLK_MVM_TANK_CALLOUT
- TLK_MVM_TANK_DEAD
- TLK_MVM_TANK_DEPLOYING
- TLK_MVM_ATTACK_THE_TANK
- TLK_MVM_TAUNT
- TLK_MVM_WAVE_START
- TLK_MVM_WAVE_WIN
- TLK_MVM_WAVE_LOSE
- TLK_MVM_DEPLOY_RAGE
- TLK_MAGIC_BIGHEAD
- TLK_MAGIC_SMALLHEAD
- TLK_MAGIC_GRAVITY
- TLK_MAGIC_GOOD
- TLK_MAGIC_DANCE
- HalloweenLongFall
- TLK_TAUNT_GUITAR_RIFF
- TLK_PLAYER_CAST_FIREBALL
- TLK_PLAYER_CAST_MERASMUS_ZAP
- TLK_PLAYER_CAST_SELF_HEAL
- TLK_PLAYER_CAST_MIRV
- TLK_PLAYER_CAST_BLAST_JUMP
- TLK_PLAYER_CAST_STEALTH
- TLK_PLAYER_CAST_TELEPORT
- TLK_PLAYER_CAST_LIGHTNING_BALL
- TLK_PLAYER_CAST_MOVEMENT_BUFF
- TLK_PLAYER_CAST_MONOCULOUS
- TLK_PLAYER_CAST_METEOR_SWARM
- TLK_PLAYER_CAST_SKELETON_HORDE
- TLK_PLAYER_CAST_BOMB_HEAD_CURSE
- TLK_PLAYER_SPELL_FIREBALL
- TLK_PLAYER_SPELL_MERASMUS_ZAP
- TLK_PLAYER_SPELL_SELF_HEAL
- TLK_PLAYER_SPELL_MIRV
- TLK_PLAYER_SPELL_BLAST_JUMP
- TLK_PLAYER_SPELL_STEALTH
- TLK_PLAYER_SPELL_TELEPORT
- TLK_PLAYER_SPELL_LIGHTNING_BALL
- TLK_PLAYER_SPELL_MOVEMENT_BUFF
- TLK_PLAYER_SPELL_MONOCULOUS
- TLK_PLAYER_SPELL_METEOR_SWARM
- TLK_PLAYER_SPELL_SKELETON_HORDE
- TLK_PLAYER_SPELL_BOMB_HEAD_CURSE
- TLK_PLAYER_SPELL_PICKUP_COMMON
- TLK_PLAYER_SPELL_PICKUP_RARE
- TLK_PLAYER_HELLTOWER_MIDNIGHT
- TLK_PLAYER_SKELETON_KING_APPEAR
- TLK_MANNHATTAN_GATE_ATK
- TLK_MANNHATTAN_GATE_TAKE
- TLK_RESURRECTED
- TLK_MVM_LOOT_COMMON
- TLK_MVM_LOOT_RARE
- TLK_MVM_LOOT_ULTRARARE
- TLK_MEDIC_HEAL_SHIELD
- TLK_TAUNT_EUREKA_EFFECT
- TLK_COMBO_KILLED
- TLK_PLAYER_ASK_FOR_BALL
- TLK_ROUND_START_COMP
- TLK_GAME_OVER_COMP
- TLK_MATCH_OVER_COMP
- 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, initiating sound and speech but no actual fire. Use trigger_ignite as a workaround. [todo tested in?]
- ExtinguishPlayer
- Extinguishes the player.
- 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.
- Note:Using
""
as the model argument will instead clear the target's custom model, returning the player to normal.
- SetCustomModelWithClassAnimations <string>
- Set a custom player model with animations.
- SetCustomModelOffset <vector>
- Set a custom player model position on the player.
- SetCustomModelRotation <vector>
- Set a custom player model rotation on the player.
- ClearCustomModelRotation
- Clears the custom player model rotation.
- 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.
- SetScriptOverlayMaterial
- Sets a custom overlay material. This overlay is separate from normal overlays (e.g. burning or env_screenoverlay) and will not get overriden.
- TriggerLootIslandAchievement
- [Todo].
- TriggerLootIslandAchievement2
- [Todo].
- RoundSpawn
- Clears any magic spell within the player's current spell book.