Ai relationship: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Moved the note.)
(Rewrote the description.)
Line 3: Line 3:
==Entity Description==
==Entity Description==
[[Image:{{PAGENAME}}.png|right]]
[[Image:{{PAGENAME}}.png|right]]
Sets relationships of
Sets a relationship type between two parties. These parties can be an [[NPC]], an NPC class, or the player(s).
* an [[NPC]] to an NPC
There are four types of relation: Neutral, hate, like and fear. Certain NPC classes will react differently when in these states.
* an NPC to an NPC class
{{todo|Do some more behavioral research on NPC(s) and post your observations below.}}
* an NPC class to an NPC
 
* an NPC class to an NPC class{{clr}}
====Neutral====
Will not attack. Rebels avoid excusingly, and can not be commanded.
 
====Hate====
Considers the target an enemy/enemies and will attack.
 
====Like====
Will not attack the target. Rebels follow automatically, and can be commanded. The player will lower his gun until the target shows signs of hostility (but can still shoot the target before this).
 
====Fear====
Avoids the target.
Headcrabs runs away without attacking. Metropolice attacks. Rebels avoids without attacking, and can not be commanded.
 
{{clr}}


{{note|The relationship can refer to the player as <code>!player</code> (singleplayer) or any client as <code>player</code> (singleplayer or multiplayer).}}
{{note|The relationship can refer to the player as <code>!player</code> (singleplayer) or any client as <code>player</code> (singleplayer or multiplayer).}}

Revision as of 07:30, 8 April 2006

Template:Wrongtitle

Entity Description

Ai relationship.png

Sets a relationship type between two parties. These parties can be an NPC, an NPC class, or the player(s). There are four types of relation: Neutral, hate, like and fear. Certain NPC classes will react differently when in these states.

Todo: Do some more behavioral research on NPC(s) and post your observations below.

Neutral

Will not attack. Rebels avoid excusingly, and can not be commanded.

Hate

Considers the target an enemy/enemies and will attack.

Like

Will not attack the target. Rebels follow automatically, and can be commanded. The player will lower his gun until the target shows signs of hostility (but can still shoot the target before this).

Fear

Avoids the target. Headcrabs runs away without attacking. Metropolice attacks. Rebels avoids without attacking, and can not be commanded.

Note.pngNote:The relationship can refer to the player as !player (singleplayer) or any client as player (singleplayer or multiplayer).

Keyvalues

<target_name_or_class> This is the NPC(s) whose disposition will change.
  • target
<target_name_or_class> This is the NPC(s) about whom the Subject(s) will change their disposition.
  • disposition
<choices> Choose the way the Subject(s) should feel about the target(s)
Literal Value Description
1 Hate
2 Fear
3 Like
4 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

See also