Bot controller: Difference between revisions
Jump to navigation
Jump to search

m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
(-added class hierarchy, cleanup) |
||
Line 1: | Line 1: | ||
{{LanguageBar}} | |||
{{CD|CTFBotController|nolink=1|file1=tf_bot_temp.cpp}} | |||
{{this is a|point entity|game=Team Fortress 2|name=bot_controller}} | {{this is a|point entity|game=Team Fortress 2|name=bot_controller}} | ||
An entity used to create a bot, and then issue commands to it. | An entity used to create a bot, and then issue commands to it. | ||
==Keyvalues== | |||
== Keyvalues == | |||
{{KV Targetname}} | |||
{{KV|Team|choices|The team of the bot.}} | {{KV|Team|choices|The team of the bot.}} | ||
:* 1 : Spectator | :* 1 : Spectator | ||
Line 19: | Line 23: | ||
:* 9 : Engineer | :* 9 : Engineer | ||
{{KV|Name of the bot.|string|The name of the bot.}} | {{KV|Name of the bot.|string|The name of the bot.}} | ||
==Inputs== | == Inputs == | ||
{{ | {{I|CreateBot|Create the bot for this controller.}} | ||
{{ | {{I|RespawnBot|Force the bot to respawn.}} | ||
{{ | {{I|AddCommandMoveToEntity|Add a command to the bot's queue, telling it to move to the specified entity.|param=target_destination}} | ||
{{ | {{I|AddCommandAttackEntity|Add a command to the bot's queue, telling it to attack the specified entity.|param=target_destination}} | ||
{{ | {{I|AddCommandSwitchWeapon|Add a command to the bot's queue, telling it to switch to the specified weapon slot.|param=integer}} | ||
{{ | {{I|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}} | ||
{{ | {{I|SetIgnoreHumans|Set whether or not the Bot should ignore human players. 1 {{=}} ignore, 0 {{=}} don't ignore.|param=integer}} | ||
{{ | {{I|PreventMovement|Set whether or not the Bot is allowed to move. 1 {{=}} prevent movement, 0 {{=}} allow movement.|param=integer}} | ||
{{ | {{I|ClearQueue|Clear the bot's command queue.}} | ||
==Outputs== | == Outputs == | ||
{{ | {{O|OnCommandFinished|Sent when a command is finished.}} | ||
Revision as of 16:22, 25 September 2024


![]() |
---|
CTFBotController |
![]() |
bot_controller
is a point entity available in Team Fortress 2.
An entity used to create a bot, and then issue commands to it.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- 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
Inputs
- CreateBot
- Create the bot for this controller.
- RespawnBot
- Force the bot to respawn.
- AddCommandMoveToEntity <targetname >
- Add a command to the bot's queue, telling it to move to the specified entity.
- AddCommandAttackEntity <targetname >
- Add a command to the bot's queue, telling it to attack the specified entity.
- AddCommandSwitchWeapon <integer >
- Add a command to the bot's queue, telling it to switch to the specified weapon slot.
- AddCommandDefend <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 <integer >
- Set whether or not the Bot should ignore human players. 1 = ignore, 0 = don't ignore.
- PreventMovement <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.