This article relates to the game "Team Fortress 2". Click here for more information.

Tf bot: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Setting bug notice hidetested=1 param on page where the bug might not need tested in param specified)
 
(4 intermediate revisions by 4 users not shown)
Line 2: Line 2:
{{TF2 topicon}}
{{TF2 topicon}}
{{Seealso|[[TFBot Technicalities]]}}
{{Seealso|[[TFBot Technicalities]]}}
{{this is a|point entity|name=tf_bot|game=Team Fortress 2}}
{{Ent not in fgd|nolink=1}}
{{this is a|model entity|name=tf_bot|game=Team Fortress 2}}
{{CD|CTFBot|base=NextBotPlayer_(Team Fortress 2)|file1=tf_bot.cpp}}
{{CD|CTFBot|base=NextBotPlayer_(Team Fortress 2)|file1=tf_bot.cpp}}
A {{ent|NextBot}} entity that acts like a {{ent|player}} entity; They represent the bots in [[Team Fortress 2]], which are officially automatically used in the Training and [https://wiki.teamfortress.com/wiki/Mann_vs._Machine Mann Vs. Machine] modes. Outside of these modes, creation of this entity should be done with the {{ent|tf_bot_add}} command.
A {{ent|NextBot}} entity that acts like a {{ent|player}} entity; They represent the bots in [[Team Fortress 2]], which are officially automatically used in the Training and [https://wiki.teamfortress.com/wiki/Mann_vs._Machine Mann Vs. Machine] modes. Outside of these modes, creation of this entity should be done with the {{ent|tf_bot_add}} command.
{{bug|Creating the entity through {{ent|ent_create}} ''will'' crash the game. Use the aforementioned tf_bot_add command.}}
{{bug|hidetested=1|Creating the entity through {{ent|ent_create}} ''will'' crash the game. Use the aforementioned tf_bot_add command.}}


==Keyvalues==
==Keyvalues==
Line 11: Line 12:


==Inputs==
==Inputs==
{{IO|IgnitePlayer|param=integer|{{tf2}} Ignites the entity with a specified lifetime and causes a reaction (sound and speech).}}
{{I|IgnitePlayer|param=integer|Ignites the entity with a specified lifetime and causes a reaction (sound and speech).}}
{{IO|ExtinguishPlayer|{{tf2}} Extinguishes the entity.}}
{{I|ExtinguishPlayer|Extinguishes the entity.}}
{{IO|BleedPlayer|param=integer|{{tf2}} Bleeds the entity with a specified length.}}
{{I|BleedPlayer|param=integer|Bleeds the entity with a specified length.}}
{{IO|RollRareSpell|{{tf2}} Forces the entity to roll a rare spell. Only available if spells are enabled on the map.}}
{{I|RollRareSpell|Forces the entity to roll a rare spell. Only available if spells are enabled on the map.}}
{{IO|SetCustomModel|param=string|{{tf2}} Set a custom entity model ''without'' animations.}}
{{I|SetCustomModel|param=string|Set a custom entity model ''without'' animations.}}
{{IO|SetCustomModelOffset|param=vector|{{tf2}} Set a custom model position on the entity.}}
{{I|SetCustomModelOffset|param=vector|Set a custom model position on the entity.}}
{{IO|SetCustomModelRotation|param=vector|{{tf2}} Set a custom model rotation on the entity.}}
{{I|SetCustomModelRotation|param=vector|Set a custom model rotation on the entity.}}
{{IO|ClearCustomModelRotation|{{tf2}} Clears the custom model rotation.}}
{{I|ClearCustomModelRotation|Clears the custom model rotation.}}
{{IO|SetCustomModelRotates|param=boolean|{{tf2}} Set if the custom model rotates or not to the entity's angles.}}
{{I|SetCustomModelRotates|param=boolean|Set if the custom model rotates or not to the entity's angles.}}
{{IO|SetCustomModelVisibleToSelf|param=boolean|{{tf2}} Set if the custom model is visible to the entity, in thirdperson.}}
{{I|SetCustomModelVisibleToSelf|param=boolean|Set if the custom model is visible to the entity, in thirdperson.}}
{{IO|SetForcedTauntCam|param=boolean|{{tf2}} Forces the player into thirdperson mode.}}
{{I|SetForcedTauntCam|param=boolean|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>.}}
{{I|SpeakResponseConcept|param=string|Forces the player to speak the specified response concept, an example being <code>halloweenlongfall</code>.}}
{{IO|TriggerLootIslandAchievement|{{tf2}} {{todo}}.}}
{{I|TriggerLootIslandAchievement|{{todo}}}}
{{IO|TriggerLootIslandAchievement2|{{tf2}} {{todo}}.}}
{{I|TriggerLootIslandAchievement2|{{todo}}}}
{{IO|RoundSpawn|{{tf2}} {{todo}}.}}
{{I|RoundSpawn|{{todo}}.}}
{{I TFTeam}}
{{I TFTeam}}
{{I BaseCombatCharacter}}
{{I BaseCombatCharacter}}

Latest revision as of 07:18, 20 May 2025

English (en)Translate (Translate)

Icon-NotInFGD.png
This entity is not in the FGD by default.
It should not be put directly in a map.

tf_bot is a model entity available in Team Fortress 2 Team Fortress 2.

C++ Class hierarchy
CTFBot
NextBotPlayer
CTFPlayer
CBaseMultiplayerPlayer
CBasePlayer
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ tf_bot.cpp

A NextBot entity that acts like a player entity; They represent the bots in Team Fortress 2, which are officially automatically used in the Training and Mann Vs. Machine modes. Outside of these modes, creation of this entity should be done with the tf_bot_add command.

Icon-Bug.pngBug:Creating the entity through ent_create will crash the game. Use the aforementioned tf_bot_add command.

Keyvalues

TeamNum:
Initial Team (TeamNum) <choices>
Which Team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator/Halloween Souls Team Fortress 2
  • 2: RED Team Fortress 2
  • 3: BLU/Robots Team Fortress 2
  • 5: Halloween Bosses (only in Team Fortress 2) !FGD

Inputs

IgnitePlayer <integerRedirectInput/integer>
Ignites the entity with a specified lifetime and causes a reaction (sound and speech).
ExtinguishPlayer
Extinguishes the entity.
BleedPlayer <integerRedirectInput/integer>
Bleeds the entity with a specified length.
RollRareSpell
Forces the entity to roll a rare spell. Only available if spells are enabled on the map.
SetCustomModel <stringRedirectInput/string>
Set a custom entity model without animations.
SetCustomModelOffset <vectorRedirectInput/Vector>
Set a custom model position on the entity.
SetCustomModelRotation <vectorRedirectInput/Vector>
Set a custom model rotation on the entity.
ClearCustomModelRotation
Clears the custom model rotation.
SetCustomModelRotates <booleanRedirectInput/boolean>
Set if the custom model rotates or not to the entity's angles.
SetCustomModelVisibleToSelf <booleanRedirectInput/boolean>
Set if the custom model is visible to the entity, in thirdperson.
SetForcedTauntCam <booleanRedirectInput/boolean>
Forces the player into thirdperson mode.
SpeakResponseConcept <stringRedirectInput/string>
Forces the player to speak the specified response concept, an example being halloweenlongfall.
TriggerLootIslandAchievement
[Todo]
TriggerLootIslandAchievement2
[Todo]
RoundSpawn
[Todo].
SetTeam <integerRedirectInput/integer>
Changes the entity's team.

CBaseCombatCharacter:

KilledNPC  !FGD
Tells the entity it killed something. Despite the name, this can include a player. This input will be automatically sent by the victim when they die.
physdamagescale <floatRedirectInput/float>
Scales damage energy when this character is hit by a physics object. With a value of 0 the NPC will take no damage from physics.

See also