Ai goal operator: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Cleanup)
Line 3: Line 3:


==Entity description==
==Entity description==
Indicates items in the world that some NPCs may operate upon
Indicates items in the world that some NPCs may operate upon.
 
==Keyvalues==
==Keyvalues==
* {{KV Targetname}}
{{KV Targetname}}
* {{KV EnableDisable}}
 
* '''actor'''
{{KV EnableDisable}}
: <target_name_or_class> NPC that should perform this operation
 
* '''target'''
{{KV|Actor to affect|target_name_or_class|NPC that should perform this operation.}}
: <target_destination> Name of the entity that the NPC should move to in order to perform the operation.
 
* '''contexttarget'''
{{KV|Position entity|target_destination|Name of the entity that the NPC should move to in order to perform the operation.}}
: <target_destination> (Optional) Name of an entity that the operator will use within context.
 
* '''state'''
{{KV|Context target|target_destination|(Optional) Name of an entity that the operator will use within context.}}
: <choices> Initial State
 
:{| class=standard-table
{{KV|Initial State|choices|}}
! Literal Value || Description
:* 1 : Not ready (closed, locked, etc)
|-
:* 2 : Ready (open and accessible)
| 0 || Not ready (closed, locked, etc)
 
|-
{{KV|How should NPC approach?|choices|}}
| 1 || Ready (open and accessible)
:* 0 : DO NOT USE THIS SETTING
|}
:* 1 : Walk
* '''moveto'''
:* 2 : Run
: <choices> How should NPC approach?
 
:{| class=standard-table
! Literal Value || Description
|-
| 0 || DO NOT USE 0
|-
| 1 || Walk
|-
| 2 || Run
|}
==Inputs==
==Inputs==
* {{I Targetname}}
{{I Targetname}}
* {{I EnableDisable}}
 
* '''Activate'''
{{I EnableDisable}}
: Begin operating on the object
 
* '''SetStateReady'''
{{IO|Activate|Begin operating on the object}}
: Set the object's state to READY. Fire this input when the object has been unlocked/opened or otherwise made ready for interaction.
 
* '''SetStateFinished'''
{{IO|SetStateReady|Set the object's state to READY. Fire this input when the object has been unlocked/opened or otherwise made ready for interaction.}}
: Fire this input when the NPC has completed the interaction with this object.
 
{{IO|SetStateFinished|Fire this input when the NPC has completed the interaction with this object.}}
 
==Outputs==
==Outputs==
* {{O Targetname}}
{{O Targetname}}
* '''OnBeginApproach'''
 
: Fired when the NPC begins to approach the position
{{IO|OnBeginApproach|Fired when the NPC begins to approach the position.}}
* '''OnMakeReady'''
 
: Make the item ready to operate
{{IO|OnMakeReady| Make the item ready to operate.}}
* '''OnBeginOperating'''
 
: Fired when the NPC is ready to operate
{{IO|OnBeginOperating|Fired when the NPC is ready to operate.}}
* '''OnFinished'''
 
: The item is done
{{IO|OnFinished'''|Fire when the item is done,}}
 
[[Category:AI]]
[[Category:Half-Life 2: Episode One Entities]]
[[Category:Half-Life 2: Episode One Entities]]
[[Category:AI]]

Revision as of 08:35, 4 February 2012

Template:Hl2 point

Entity description

Indicates items in the world that some NPCs may operate upon.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities


Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).


Actor to affect ([todo internal name (i)]) <target_name_or_class>
NPC that should perform this operation.


Position entity ([todo internal name (i)]) <targetname>
Name of the entity that the NPC should move to in order to perform the operation.


Context target ([todo internal name (i)]) <targetname>
(Optional) Name of an entity that the operator will use within context.


Initial State ([todo internal name (i)]) <choices>
  • 1 : Not ready (closed, locked, etc)
  • 2 : Ready (open and accessible)


How should NPC approach? ([todo internal name (i)]) <choices>
  • 0 : DO NOT USE THIS SETTING
  • 1 : Walk
  • 2 : Run

Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.


Activate
Begin operating on the object


SetStateReady
Set the object's state to READY. Fire this input when the object has been unlocked/opened or otherwise made ready for interaction.


SetStateFinished
Fire this input when the NPC has completed the interaction with this object.

Outputs

OnBeginApproach
Fired when the NPC begins to approach the position.


OnMakeReady
Make the item ready to operate.


OnBeginOperating
Fired when the NPC is ready to operate.


OnFinished
Fire when the item is done,