Tf logic training mode: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added some outputs description)
No edit summary
Line 1: Line 1:
{{tf2 point|tf_logic_training_mode}}
{{tf2 point|tf_logic_training_mode}}
 
{{note|None of the inputs/outputs function in multiplayer except for <code>KickBots</code>.}}
==Entity description==
Handles outputs and and messages for training, mainly for the [[player.]]
Handles outputs and and messages for training.


==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV|Next Map (nextMap)|string|Next map to load when the current one is finished. Default choices are <code>tr_dustbowl</code> and <code>tr_target</code>, although any map is accepted.}}
{{KV|Next Map|choices|Next map to load when the current one is finished.}}
{{KV BaseEntity}}
:{| class=standard-table
!| Value || Description
|-
| tr_dustbowl ||
|-
| tr_target||
 
|}
 
==Inputs==
==Inputs==
{{I Targetname}}
{{IO|ShowTrainingMsg|Show a training message, for training mode. The parameter should be the string entry in tf_english.txt|param=string}}
{{IO|ShowTrainingMsg|param=string}}
{{IO|ShowTrainingObjective|param=string|Sets a training objective to show to the player.}}
{{IO|ShowTrainingObjective|param=string}}
{{IO|KickBots|Kicks all [[bot]]s from the server.}}
{{IO|ForcePlayerSpawnAsClassOutput}}
{{IO|ShowTrainingHUD|Makes the training objective HUD visible.}}
{{IO|KickBots}}
{{IO|HideTrainingHUD|Makes the training objective HUD hidden.}}
{{IO|ShowTrainingHUD}}
{{IO|EndTraining|param=string|Ends training mode.}}
{{IO|HideTrainingHUD}}
:{{todo|Why is this a string?}}
{{IO|EndTraining|param=string}}
{{IO|PlaySoundOnPlayer|param=string|Play a sound on the player.}}
{{IO|PlaySoundOnPlayer|param=string}}
{{IO|WaitForTimerOrKeypress|Wait for the specified [[logic_timer]] entity to fire on its interval or for a keypress from the player.|param=string}}
{{IO|WaitForTimerOrKeypress|param=string}}
{{IO|SetNextMap|param=string|Set the next map for training.}}
 
{{IO|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.}}
{{I BaseEntity}}
==Outputs==
==Outputs==
{{O Targetname}}
{{IO|OnPlayerSpawnAsScout|Fired when the player spawns as a Scout.}}
{{IO|OnPlayerSpawnAsScout|Fired when the player spawn as a scout.}}
{{IO|OnPlayerSpawnAsSniper|Fired when the player spawns as a Sniper.}}
{{IO|OnPlayerSpawnAsSniper|Fired when the player spawn as a sniper.}}
{{IO|OnPlayerSpawnAsSoldier|Fired when the player spawns as a Soldier.}}
{{IO|OnPlayerSpawnAsSoldier|Fired when the player spawn as a soldier.}}
{{IO|OnPlayerSpawnAsDemoman|Fired when the player spawns as a Demoman.}}
{{IO|OnPlayerSpawnAsDemoman|Fired when the player spawn as a demoman.}}
{{IO|OnPlayerSpawnAsMedic|Fired when the player spawns as a Medic.}}
{{IO|OnPlayerSpawnAsMedic|Fired when the player spawn as a medic.}}
{{IO|OnPlayerSpawnAsHeavy|Fired when the player spawns as a Heavy.}}
{{IO|OnPlayerSpawnAsHeavy|Fired when the player spawn as a heavy.}}
{{IO|OnPlayerSpawnAsPyro|Fired when the player spawns as a Pyro.}}
{{IO|OnPlayerSpawnAsPyro|Fired when the player spawn as a pyro.}}
{{IO|OnPlayerSpawnAsSpy|Fired when the player spawns as a Spy.}}
{{IO|OnPlayerSpawnAsSpy|Fired when the player spawn as a spy.}}
{{IO|OnPlayerSpawnAsEngineer|Fired when the player spawns as an Engineer.}}
{{IO|OnPlayerSpawnAsEngineer|Fired when the player spawn as an engineer.}}
{{IO|OnPlayerDied|Fired when the player dies.}}
{{IO|OnPlayerDied}}
{{IO|OnBotDied|Fired when a bot dies.}}
{{IO|OnBotDied}}
{{IO|OnPlayerSwappedToPrimary|Fired when the player swaps to the item in their primary weapon slot.}}
{{IO|OnPlayerSwappedToPrimary|Fired when the player swap to his primary weapon.}}
{{IO|OnPlayerSwappedToSecondary|Fired when the player swaps to the item in their secondary weapon slot.}}
{{IO|OnPlayerSwappedToSecondary|Fired when the player swap to his secondary weapon.}}
{{IO|OnPlayerSwappedToMelee|Fired when the player swaps to the item in their melee weapon slot.}}
{{IO|OnPlayerSwappedToMelee|Fired when the player swap to his melee weapon.}}
{{IO|OnPlayerSwappedToBuilding|Fired when the player swaps to the item in their building weapon slot.}}
{{IO|OnPlayerSwappedToPDA|Fired when the player swaps to the item in their PDA weapon slot.}}
{{IO|OnBuildOutsideArea|Fired when the player builds an object outside a suggested area.}}
{{IO|OnPlayerDetonateBuilding|Sent when the player manually detonates one of their buildings.}}
{{O BaseEntity}}

Revision as of 09:22, 21 October 2018

Team Fortress 2 tf_logic_training_mode is a point entity available in Team Fortress 2 Team Fortress 2.

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

Handles outputs and and messages for training, mainly for the player.

Keyvalues

Next Map (nextMap) ([todo internal name (i)]) <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 <stringRedirectInput/string>
Show a training message, for training mode. The parameter should be the string entry in tf_english.txt
ShowTrainingObjective <stringRedirectInput/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 <stringRedirectInput/string>
Ends training mode.
Todo: Why is this a string?
PlaySoundOnPlayer <stringRedirectInput/string>
Play a sound on the player.
WaitForTimerOrKeypress <stringRedirectInput/string>
Wait for the specified logic_timer entity to fire on its interval or for a keypress from the player.
SetNextMap <stringRedirectInput/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.