Ai goal follow: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Formatting. Last one, promise!)
(Now a proper article)
Line 1: Line 1:
==ai_goal_follow==
Makes the target NPCs follow another object or the player at a configurable distance.


AI Goal Follow
==Keyvalues==
 
* '''Actor(s) to affect:''' the name of the NPCs that will be following.
==Keys==
* '''Target Entity:''' the name of the entity that the NPCs should follow.
 
** If this value is blank, NPCs will follow the player if they are friendly towards him
'''Name''' targetname <target_source> The name that other entities refer to this entity by.
* '''Search Type:''' is '''Actor(s) to affect''' the NPC name or class?
 
* '''Maximum state:''' The maximum state for NPCs to continue following. If this value is set to '''idle''' for instance, '''alert''' NPCs will ignore the goal.
'''Actor(s) to affect''' actor <target_name_or_class>
* '''Formation:''' how close to the target the NPCs should follow.
 
'''Target Entity''' goal <string> The name of the entity to follow. If blank, and the actor likes the player, then defaults to player
 
'''Search Type''' SearchType <choices> How to search for the entities using the targetname.
 
'''Start Active''' StartActive <choices>
 
'''Maximum state''' MaximumState <choices>
 
'''Formation''' Formation <choices>


==Inputs==
==Inputs==
* '''Activate/Deactivate:''' begin or end the following behaviour


'''Kill''' Removes this entity from the world.
==Limitations and bugs==
 
* NPCs do not intelligently follow their target. They will instead walk or run depending on distance directly towards it.
'''KillHierarchy''' Removes this entity and all its children from the world.
* If NPCs are following another NPC and that NPC needs to get past them, they will not move out of the way and the leading NPC will eventually give up.
 
* Keyvalues cannot be changed once the map has been compiled.
'''AddOutput <string>''' Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
 
'''FireUser1''' Causes this entity's OnUser1 output to be fired.
 
'''FireUser2''' Causes this entity's OnUser2 output to be fired.
 
'''FireUser3''' Causes this entity's OnUser3 output to be fired.
 
'''FireUser4''' Causes this entity's OnUser4 output to be fired.
 
'''Activate''' Begin the follow behavior
 
'''Deactivate''' Cease the follow behavior
 
==Outputs==
 
'''OnUser1''' Fired in response to FireUser1 input.
 
'''OnUser2''' Fired in response to FireUser2 input.
 
'''OnUser3''' Fired in response to FireUser3 input.
 
'''OnUser4''' Fired in response to FireUser4 input.


[[Category:AI]]
[[Category:AI]]
[[Category:Entities]]
[[Category:Entities]]

Revision as of 06:51, 5 July 2005

Makes the target NPCs follow another object or the player at a configurable distance.

Keyvalues

  • Actor(s) to affect: the name of the NPCs that will be following.
  • Target Entity: the name of the entity that the NPCs should follow.
    • If this value is blank, NPCs will follow the player if they are friendly towards him
  • Search Type: is Actor(s) to affect the NPC name or class?
  • Maximum state: The maximum state for NPCs to continue following. If this value is set to idle for instance, alert NPCs will ignore the goal.
  • Formation: how close to the target the NPCs should follow.

Inputs

  • Activate/Deactivate: begin or end the following behaviour

Limitations and bugs

  • NPCs do not intelligently follow their target. They will instead walk or run depending on distance directly towards it.
  • If NPCs are following another NPC and that NPC needs to get past them, they will not move out of the way and the leading NPC will eventually give up.
  • Keyvalues cannot be changed once the map has been compiled.