Bot npc archer: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Creation of the page.)
 
m (Fixed a link.)
Line 7: Line 7:
This is an AI-controlled entity using the <code>models\player\sniper.mdl</code> model which wields a Huntsman. This entity will move only if a valid [[Navigation Meshes|navigation mesh]] exists.
This is an AI-controlled entity using the <code>models\player\sniper.mdl</code> model which wields a Huntsman. This entity will move only if a valid [[Navigation Meshes|navigation mesh]] exists.


This entity is '''NOT''' a [[Server-sided Bots|bot]]. As such, it will not take any player slot.
This entity is '''NOT''' a [[Server-Side Bots|bot]]. As such, it will not take any player slot.


== Behavior ==
== Behavior ==

Revision as of 09:16, 29 April 2015

Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.

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

Entity description

This is an AI-controlled entity 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.

Behavior

Once spawned, this entity will always rejoin its original spawn point before it can attack, unless there is not any valid navigation mesh file.


It will go into humiliation pose unless if 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.

Note.pngNote:The entity aims the BLU players heads and according to the player's speed. As such, he can kill moving targets.
Icon-Bug.pngBug: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.  [todo tested in ?]
Icon-Bug.pngBug:When spawned using the ent_create bot_npc_archer command, this entity will try to rejoin 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).  [todo tested in ?]


Note.pngNote: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.

Dedicated console variables

  • tf_bot_npc_archer_arrow_damage <int> (Default: 75)

The amount of damage of each arrow.

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


  • tf_bot_npc_archer_health <int> (Default: 100)

The amount of health of the entity.

Note.pngNote: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.pngNote: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.

Icon-Bug.pngBug:This variable does not work.  [todo tested in ?]

Keyvalues

targetname <string>

The targetname that other entities refer to this entity by.


teamnum <int>

The team of the entity.

Icon-Bug.pngBug:This entity will never target RED players and will always target BLU players regardless of its team.  [todo tested in ?]
Note.pngNote:The skin of the entity's model is independant of its team number.


skin <int>

The skin for the entity's model.

Inputs

Todo: Complete this section.

Outputs

OnIgnite

Fired when this entity is ignited.