Ai relationship: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Technical limitations)
No edit summary
Line 5: Line 5:
AI Relationship - Sets relationships between groups of NPCs in the AI.
AI Relationship - Sets relationships between groups of NPCs in the AI.


==Keys==
==Keyvalues==


'''Name''' targetname <target_source> The name that other entities refer to this entity by.
* [[Targetname]]


'''Subject(s)''' subject <target_name_or_class> This is the NPC(s) whose disposition will change. May be a targetname or a classname.
* '''subject'''
:<target_name_or_class> This is the NPC(s) whose disposition will change. May be a targetname or a classname.


'''Target(s)''' target <target_name_or_class> This is the NPC(s) about whom the Subject(s) will change their disposition. May be a tarGetname or a classname.
* '''target'''
:<target_name_or_class> This is the NPC(s) about whom the Subject(s) will change their disposition. May be a tarGetname or a classname.


'''Disposition''' disposition <choices> Choose the way the Subject(s) should feel about the Target(s)
* '''disposition'''
:<choices> Choose the way the Subject(s) should feel about the Target(s)
:* Hate
:* Fear
:* Like
:* Neutral


'''Radius for subject''' radius <float>  
* '''radius'''
:<float> Radius for subject


'''Disposition Priority''' rank <integer> How much the Subject(s) should Like/Hate/Fear the Target(s). Higher priority = stronger feeling.
* '''rank'''
:<integer> How much the Subject(s) should Like/Hate/Fear the Target(s). Higher priority = stronger feeling.


'''Start Active''' StartActive <choices>  
* '''StartActive'''
:<boolean>


'''Reciprocal''' Reciprocal <choices> Set this to YES to have the new relationship mirrored by Target
* '''Reciprocal'''
:<boolean> Set this to have the new relationship mirrored by Target


==Inputs==
==Inputs==


'''Kill''' Removes this entity from the world.
* [[Targetname]]


'''KillHierarchy''' Removes this entity and all its children from the world.
* '''ApplyRelationship'''
:Apply relationship changes


'''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.
* '''RevertRelationship'''
 
:Revert relationship changes
'''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.
 
'''ApplyRelationship''' Apply relationship changes
 
'''RevertRelationship''' Revert relationship changes


==Outputs==
==Outputs==


'''OnUser1''' Fired in response to FireUser1 input.
* [[Targetname]]
 
'''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 16:55, 9 July 2005

Template:Wrongtitle

ai_relationship

AI Relationship - Sets relationships between groups of NPCs in the AI.

Keyvalues

  • subject
<target_name_or_class> This is the NPC(s) whose disposition will change. May be a targetname or a classname.
  • target
<target_name_or_class> This is the NPC(s) about whom the Subject(s) will change their disposition. May be a tarGetname or a classname.
  • disposition
<choices> Choose the way the Subject(s) should feel about the Target(s)
  • Hate
  • Fear
  • Like
  • Neutral
  • radius
<float> Radius for subject
  • rank
<integer> How much the Subject(s) should Like/Hate/Fear the Target(s). Higher priority = stronger feeling.
  • StartActive
<boolean>
  • Reciprocal
<boolean> Set this to have the new relationship mirrored by Target

Inputs

  • ApplyRelationship
Apply relationship changes
  • RevertRelationship
Revert relationship changes

Outputs