Bot controller: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Removed: "Bug: Non-functional" for Name of the bot. Tested this and it is functional.)
m (→‎Inputs: Unicodifying, replaced: {{Template: → {{ (4))
Line 27: Line 27:
{{IO|AddCommandSwitchWeapon|Add a command to the bot's queue, telling it to switch to the specified weapon slot.|param=integer}}
{{IO|AddCommandSwitchWeapon|Add a command to the bot's queue, telling it to switch to the specified weapon slot.|param=integer}}
{{IO|AddCommandDefend|Add a command to the bot's queue, telling it to defend the position it's standing at. The parameter specifies the distance from the point that the Bot is allowed to move to fight enemies.|param=float}}
{{IO|AddCommandDefend|Add a command to the bot's queue, telling it to defend the position it's standing at. The parameter specifies the distance from the point that the Bot is allowed to move to fight enemies.|param=float}}
{{IO|SetIgnoreHumans|Set whether or not the Bot should ignore human players. 1 {{Template:=}} ignore, 0 {{Template:=}} don't ignore.|param=integer}}
{{IO|SetIgnoreHumans|Set whether or not the Bot should ignore human players. 1 {{=}} ignore, 0 {{=}} don't ignore.|param=integer}}
{{IO|PreventMovement|Set whether or not the Bot is allowed to move. 1 {{Template:=}} prevent movement, 0 {{Template:=}} allow movement.|param=integer}}
{{IO|PreventMovement|Set whether or not the Bot is allowed to move. 1 {{=}} prevent movement, 0 {{=}} allow movement.|param=integer}}
{{IO|ClearQueue|Clear the bot's command queue.}}
{{IO|ClearQueue|Clear the bot's command queue.}}
{{I BaseEntity}}
{{I BaseEntity}}

Revision as of 05:50, 7 January 2024

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

Entity description

An entity used to create a bot, and then issue commands to it.

Keyvalues

Team ([todo internal name (i)]) <choices>
The team of the bot.
  • 1 : Spectator
  • 2 : Red
  • 3 : Blue
Class ([todo internal name (i)]) <choices>
The class the bot will spawn as.
  • 0 : Random
  • 1 : Scout
  • 2 : Sniper
  • 3 : Soldier
  • 4 : Demoman
  • 5 : Medic
  • 6 : Heavy
  • 7 : Pyro
  • 8 : Spy
  • 9 : Engineer
Name of the bot. ([todo internal name (i)]) <string>
The name of the bot.

Inputs

CreateBot
Create the bot for this controller.
RespawnBot
Force the bot to respawn.
AddCommandMoveToEntity <targetnameRedirectInput/string>
Add a command to the bot's queue, telling it to move to the specified entity.
AddCommandAttackEntity <targetnameRedirectInput/string>
Add a command to the bot's queue, telling it to attack the specified entity.
AddCommandSwitchWeapon <integerRedirectInput/integer>
Add a command to the bot's queue, telling it to switch to the specified weapon slot.
AddCommandDefend <floatRedirectInput/float>
Add a command to the bot's queue, telling it to defend the position it's standing at. The parameter specifies the distance from the point that the Bot is allowed to move to fight enemies.
SetIgnoreHumans <integerRedirectInput/integer>
Set whether or not the Bot should ignore human players. 1 = ignore, 0 = don't ignore.
PreventMovement <integerRedirectInput/integer>
Set whether or not the Bot is allowed to move. 1 = prevent movement, 0 = allow movement.
ClearQueue
Clear the bot's command queue.

Outputs

OnCommandFinished
Sent when a command is finished.