Ai goal operator: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (removed {{DISPLAYTITLE}}, covered by the hl2 point template)
(updates)
Line 1: Line 1:
{{hl2 point|ai_goal_operator}}
{{lang|Ai goal operator}}
{{hl2 point|ai_goal_operator}} It indicates items in the world that some NPCs may operate upon.


==Entity description==
{{code class|CAI_OperatorGoal|ai_behavior_operator.cpp}}
Indicates items in the world that some NPCs may operate upon.


==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV|Actor to affect (actor)|target_name_or_class|NPC that should perform this operation.}}
 
{{KV|Position entity (target)|target_destination|Name of the entity that the NPC should move to in order to perform the operation.}}
{{KV|Context target (contexttarget)|target_destination|(Optional) Name of an entity that the operator will use within context.}}
{{KV|Initial State (state)|choices|How the operated entity starts.
:*1: Not ready (closed, locked, etc)
:*2: Ready (open and accessible)}}
{{KV|How should NPC approach? (moveto)|choices|{{confirm|Not implemented?}}
:*0: DO NOT USE THIS SETTING
:*1: Walk
:*2: Run}}
{{KV EnableDisable}}
{{KV EnableDisable}}
 
{{KV BaseEntity|base=1}}
{{KV|Actor to affect|target_name_or_class|NPC that should perform this operation.}}
 
{{KV|Position entity|target_destination|Name of the entity that the NPC should move to in order to perform the operation.}}
 
{{KV|Context target|target_destination|(Optional) Name of an entity that the operator will use within context.}}
 
{{KV|Initial State|choices|
:* 1 : Not ready (closed, locked, etc)
:* 2 : Ready (open and accessible)}}
 
{{KV|How should NPC approach?|choices|
:* 0 : DO NOT USE THIS SETTING
:* 1 : Walk
:* 2 : Run}}


==Inputs==
==Inputs==
{{I Targetname}}
{{IO|Activate|Begin operating on the object.}}
 
{{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.}}
{{IO|SetStateFinished|Fire this input when the NPC has completed the interaction with this object.}}
{{I EnableDisable}}
{{I EnableDisable}}
 
{{I BaseEntity|base=1}}
{{IO|Activate|Begin operating on the object}}
 
{{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.}}
 
{{IO|SetStateFinished|Fire this input when the NPC has completed the interaction with this object.}}


==Outputs==
==Outputs==
{{O Targetname}}
{{IO|OnBeginApproach|Fired when the NPC begins to approach the position.}}
{{IO|OnBeginApproach|Fired when the NPC begins to approach the position.}}
 
{{IO|OnMakeReady|Fired when the item is ready to operate.}}
{{IO|OnMakeReady| Make the item ready to operate.}}
 
{{IO|OnBeginOperating|Fired when the NPC is ready to operate.}}
{{IO|OnBeginOperating|Fired when the NPC is ready to operate.}}
 
{{IO|OnFinished|Fired when <code>SetStateFinished</code> is sent to the entity.}}
{{IO|OnFinished'''|Fire when the item is done,}}
{{O BaseEntity}}


[[Category:AI]]
[[Category:AI]]
[[Category:Half-Life 2: Episode One Entities]]

Revision as of 17:48, 3 September 2018

English (en)Translate (Translate)

Template:Hl2 point It indicates items in the world that some NPCs may operate upon.

C++ In code, it is represented by theCAI_OperatorGoalclass, defined in theai_behavior_operator.cppfile.

Keyvalues

Actor to affect (actor) ([todo internal name (i)]) <target_name_or_class>
NPC that should perform this operation.
Position entity (target) ([todo internal name (i)]) <targetname>
Name of the entity that the NPC should move to in order to perform the operation.
Context target (contexttarget) ([todo internal name (i)]) <targetname>
(Optional) Name of an entity that the operator will use within context.
Initial State (state) ([todo internal name (i)]) <choices>
How the operated entity starts.
  • 1: Not ready (closed, locked, etc)
  • 2: Ready (open and accessible)
How should NPC approach? (moveto) ([todo internal name (i)]) <choices>
Confirm:Not implemented?
  • 0: DO NOT USE THIS SETTING
  • 1: Walk
  • 2: Run
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).


Inputs

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.

EnableDisable:

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


Outputs

OnBeginApproach
Fired when the NPC begins to approach the position.
OnMakeReady
Fired when the item is ready to operate.
OnBeginOperating
Fired when the NPC is ready to operate.
OnFinished
Fired when SetStateFinished is sent to the entity.