From Valve Developer Community
Jump to: navigation, search

<Team Fortress 2> bot_npc_archer is a point entity available in Team Fortress 2.

Entity description

This is a NextBot using the models\player\sniper.mdl model which wields a Huntsman. This entity will move only if a valid navigation mesh exists.

This entity is NOT a bot. As such, it will not take any player slot.


It will go into humiliation pose unless one of the following entities is present on the map:

If at least one of those entities exists, the archer will shoot any BLU player which can be attacked. The NPC aims for heads and aims ahead in case a target is moving. When a BLU player is killed by a headshot from this entity, the kill feed will display an environmental headshot death icon. In the case of a bodyshot, a regular environmental death will be shown. Despite first appearances, this NPC is teamless, and can take and give damage to RED or BLU players. A similar teamless state has been seen with poor coding.

Bug.png Bug: The entity does not compensate for gravity when shooting. The archer will still attempt to shoot at very far targets but his arrows will always miss.
Bug.png Bug: When spawned using the ent_create bot_npc_archer command, this entity will try to go to the origin of the map, if a navigation mesh file is present. This is because the command causes the game to spawn the entity to the origin of the map, and then teleports it to where the player is looking (if possible).

Dedicated console variables

  • tf_bot_npc_archer_arrow_damage <int> (Default: 75)

The amount of damage of each arrow.

Note.png Note: This is the amount of damage for bodyshots.

  • tf_bot_npc_archer_health <int> (Default: 100)

The amount of health of the entity.

Note.png Note: The new value is NOT applied to archers that already exist.

  • tf_bot_npc_archer_shoot_interval <int> (Default: 2)

After shooting an arrow, the entity will not shoot again for this delay.

Note.png Note: Setting a very small value will cause the entity to shoot quickly and then to wait shortly regardless of the specified value.

  • tf_bot_npc_archer_speed <int> (Default: 100)

The speed of the entity when it moves.

Bug.png Bug: This variable does not work.


targetname <string>

The targetname that other entities refer to this entity by.

teamnum <int>

The team of the entity.

Bug.png Bug: This entity will never target RED players and will always target BLU players regardless of its team.
Note.png Note: The skin of the entity's model is independant of its team number.

skin <int>

The skin for the entity's model.


All of the following inputs have been seen to evoke some form of response from this entity, using ent_fire:

  • AddContext (doesn't work, but does give an error message)
  • BecomeRagdoll
  • Color (changes red only?)
  • Ignite
  • IgniteHitboxFireScale
  • IgniteLifetime
  • IgniteNumHitboxFires
  • Kill
  • KillHierarchy
  • SetModelScale
  • SetParent
Note.png Note: This is likely not a complete list. If you see any other ones that work, add them!



Fired when this entity is ignited.