tf_logic_training_mode

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
Class hierarchy
CTrainingModeLogic
CPointEntity
CBaseEntity
tf_gamerules.cpp

tf_logic_training_mode is a point entity available in Team Fortress 2 Team Fortress 2. Handles outputs and and messages for training, mainly for the player.

Note.pngNote:None of the inputs/outputs function in multiplayer except for KickBots.

Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Next Map (nextMap) <string>
Next map to load when the current one is finished. Default choices are tr_dustbowl and tr_target, although any map is accepted.

Inputs

ShowTrainingMsg <string>
Show a training message, for training mode. The parameter should be the string entry in tf_english.txt
ShowTrainingObjective <string>
Sets a training objective to show to the player.
KickBots
Kicks all bots from the server.
ShowTrainingHUD
Makes the training objective HUD visible.
HideTrainingHUD
Makes the training objective HUD hidden.
EndTraining <string>
Ends training mode. The parameter is for displaying ending text from tf_english.txt
PlaySoundOnPlayer <string>
Play a sound on the player.
WaitForTimerOrKeypress <string>
Wait for the specified logic_timer entity to fire on its interval or for a keypress from the player.
SetNextMap <string>
Set the next map for training.
ForcePlayerSpawnAsClassOutput
Force the appropriate output to fire for the player spawning as a class. You can use this to essentially ask what class the player is.

Outputs

OnPlayerSpawnAsScout
Fired when the player spawns as a Scout.
OnPlayerSpawnAsSniper
Fired when the player spawns as a Sniper.
OnPlayerSpawnAsSoldier
Fired when the player spawns as a Soldier.
OnPlayerSpawnAsDemoman
Fired when the player spawns as a Demoman.
OnPlayerSpawnAsMedic
Fired when the player spawns as a Medic.
OnPlayerSpawnAsHeavy
Fired when the player spawns as a Heavy.
OnPlayerSpawnAsPyro
Fired when the player spawns as a Pyro.
OnPlayerSpawnAsSpy
Fired when the player spawns as a Spy.
OnPlayerSpawnAsEngineer
Fired when the player spawns as an Engineer.
OnPlayerDied
Fired when the player dies.
OnBotDied
Fired when a bot dies.
OnPlayerSwappedToPrimary
Fired when the player swaps to the item in their primary weapon slot.
OnPlayerSwappedToSecondary
Fired when the player swaps to the item in their secondary weapon slot.
OnPlayerSwappedToMelee
Fired when the player swaps to the item in their melee weapon slot.
OnPlayerSwappedToBuilding
Fired when the player swaps to the item in their building weapon slot.
OnPlayerSwappedToPDA
Fired when the player swaps to the item in their PDA weapon slot.
OnBuildOutsideArea
Fired when the player builds an object outside a suggested area.
OnPlayerDetonateBuilding
Sent when the player manually detonates one of their buildings.