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

tf_bot

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)

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

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

Class hierarchy
CTFBot
NextBotPlayer
CTFPlayer
CBaseMultiplayerPlayer
CBasePlayer
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
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.  [todo tested in?]

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 <integer>
Ignites the entity with a specified lifetime and causes a reaction (sound and speech).
ExtinguishPlayer
Extinguishes the entity.
BleedPlayer <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 <string>
Set a custom entity model without animations.
SetCustomModelOffset <vector>
Set a custom model position on the entity.
SetCustomModelRotation <vector>
Set a custom model rotation on the entity.
ClearCustomModelRotation
Clears the custom model rotation.
SetCustomModelRotates <boolean>
Set if the custom model rotates or not to the entity's angles.
SetCustomModelVisibleToSelf <boolean>
Set if the custom model is visible to the entity, 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.
TriggerLootIslandAchievement
[Todo]
TriggerLootIslandAchievement2
[Todo]
RoundSpawn
[Todo].

TFTeam:

SetTeam <integer>
Changes the entity's Team keyvalue.

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 <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