simple_bot

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
Icon-callout-not-in-fgd.png
This entity is not in the FGD by default.
See below for instructions on making it available.
C++ Class hierarchy
CSimpleBot
↳NextBotCombatCharacter
↳CBaseCombatCharacter
↳CBaseFlex
↳CBaseAnimatingOverlay
↳CBaseAnimating
↳CBaseEntity
C++ simple_bot.cpp

simple_bot is a model entity available in Counter-Strike: Source Counter-Strike: Source, Team Fortress 2 Team Fortress 2, Dota 2 Dota 2, and Black Mesa Black Mesa.

It is a very rudimentary example of a NextBot entity, displaying the bare minimum required for the AI system to function.

This entity uses the model of a female Citizen - with no animations associated with it - and is unable to be damaged or killed. If the map has a .nav file, the entity will move to random areas when possible.

As an alternative to using ent_create for spawning instances of simple_bot, the cheat command simple_bot_add will instantly create the entity wherever your crosshair aims at.

Icon-Bug.pngBug*:Using simple_bot_add will crash the game immediately in Team Fortress 2 Team Fortress 2. Use ent_create simple_bot instead.

Keyvalues Team Fortress 2 branch

Todo: Add more games that match this list
Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also: Generic Keyvalues, Inputs and Outputs available to all entities
Health (health) <integer>
Health of the entity, unused.
Model Scale (modelscale) <float>
Scale of the model in all axis.
Physics Damage Scale (physdamagescale) <float>
Scale of the damage dealt by its ragdoll.
Sequence (sequence) <integer>
Unknown use.
Friction (friction) <float>
Friction.
Collision Group (collisiongroup) <integer>
The entity's collision group.
Hammer ID (hammerid) <integer>
Unknown use.
Initial Team (TeamNum, or teamnumber Counter-Strike: Global Offensive) <integer choices>
Which team the entity belongs / is assigned to on spawn
  • 0: None, Neutral Team Fortress 2Day of Defeat: Source
  • 1: Spectator, Spectator/Halloween Souls Team Fortress 2
  • 2: RED Team Fortress 2, Survivors Left 4 Dead seriesLeft 4 Dead series, Terrorists Counter-Strike: Source Counter-Strike: Global Offensive, Allies Day of Defeat: Source, Marines (Team-based game modes only) Black Mesa
  • 3: BLU/Robots Team Fortress 2, Infected Left 4 Dead seriesLeft 4 Dead series, Counter-Terrorists Counter-Strike: Source Counter-Strike: Global Offensive, Axis Day of Defeat: Source, Scientists (Team-based game modes only) Black Mesa
  • 5: Halloween Bosses (only in Team Fortress 2) !FGD

Inputs Team Fortress 2 branch

Todo: Add more games that match this list
FireUser1 to FireUser4  <stringRedirectInput/string>
Fires the respectiveOnUseroutputs; see User Inputs and Outputs.
Warning.pngWarning: Can take string parameter and doesn't do anything with it. This can cause an issue if this input is fired from outputs that can send a value. Make sure to specify dummy string in such cases other-wise the output will use its value as parameter causing the input to fail with "bad input/output link" error in console.
KilledNPC <void>
Does nothing
Ignite
Makes the entity catch on fire indefinitely.
IgniteLifetime <floatRedirectInput/float>
Makes the entity catch on fire for a given amount of time.
IgniteNumHitboxFires <integerRedirectInput/integer> (removed since Left 4 Dead 2)
Makes the entity catch on fire with a given number of hitbox fire particles.
IgniteHitboxFireScale <floatRedirectInput/float> (removed since Left 4 Dead 2)
Makes the entity catch on fire with a given scale for hitbox fire particles.
BecomeRagdoll <void>
Makes the entity become a Ragdoll
SetLightingOrigin <targetnameRedirectInput/string>
Sets the entity's lighting origin to use this entity's position.
SetLightingOriginHack <targetnameRedirectInput/string> (removed since Left 4 Dead) Obsolete
Deprecated.
Offsets the entity's lighting origin by their distance from an info_lighting_relative. Use SetLightingOrigin instead.
SetModelScale <floatRedirectInput/float>
Sets the entity's Model Scale
SetModel <model pathRedirectInput/string>
Sets the entity's Model
SetPlayBackRate <floatRedirectInput/float>
Change the animation speed multiplier.
SetCycle <floatRedirectInput/float> (only in Team Fortress 2 branch)
Skip to a specific point in the current animation.
SetTeam <integerRedirectInput/integer>
Changes the entity's team.
Kill <void>
Deletes the entity
KillHierarchy <void>
Deletes the entity and all its children on the same tick
Use <void>
Seems to do nothing.
Alpha <integer 0–255>
Supposed to set transparency, doesnt do anything visually
AlternativeSorting <booleanRedirectInput/boolean>
Swaps the rendering order of the entity. Used to attempt to fix sorting problems when rendering, for example an object rendering in front of translucent materials.
Color <color255RedirectInput/color32>
Sets an RGB color for the entity.
SetParent <targetnameRedirectInput/string>
supports !activator but not !caller
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
EnableDamageForces <void>
Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).
DisableDamageForces <void>
Prevents the entity from being pushed by damage done to it.

Template:I DispatchEffect Template:I DispatchResponse

AddContext <stringRedirectInput/string>
Adds a context to this entity's list of response contexts. The format should be 'key:value'
RemoveContext <stringRedirectInput/string>
Remove a context from this entity's list of response contexts. The name should match the 'key' of a previously added context.
ClearContext <void>
Removes all contexts in this entity's list of response contexts.
DisableShadow <void>
Disables dynamic shadow casting.
EnableShadow <void>
Enables dynamic shadow casting.
AddOutput <keyvalue>
Sets a keyvalue.
RunScriptFile <scriptRedirectInput/string> (in all games since Left 4 Dead 2) (also in Team Fortress 2 branch)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.

{{I|RunScriptCode|param=string|Execute a string of VScript source code in the scope of the entity receiving the input. Variables activator, caller, self are available when the script is run (same applies to RunScriptFile).

Warning.pngWarning: Using the quote symbol " in any text field of a Hammer Object Properties Dialog will lead to VMF corruption, fixable only by editing the VMF directly with a text editor and removing the added quote symbol.
CallScriptFunction <stringRedirectInput/string> (in all games since Left 4 Dead 2) (also in Team Fortress 2 branch) !FGD
Calls a VScript function defined in the scope of the receiving entity.
Note.pngNote: activator and caller are unavailable.
TerminateScriptScope  (only in Team Fortress 2 branch) !FGD
Destroys the script scope of the receiving entity.

Outputs Team Fortress 2 branch

Todo: Add more games that match this list
OnUser1 to OnUser4
!activator = activator of FireUser1-4 inputs
!caller = this entity
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnIgnite  !FGD
!activator = !caller = this entity
Fired when the entity catches fire, such as from an env_entity_igniter or the Ignite inputs.

See Also