Ai goal operator: Difference between revisions
Jump to navigation
Jump to search

m (Updated old entity format to {{this is a}}. This action was perfomed by a bot.) |
(Preparing page for move. This action was perfomed by a bot under supervision.) |
||
Line 1: | Line 1: | ||
{{ | {{langsp}} | ||
It indicates items in the world that some NPCs may operate upon. | |||
{{stray ent|{{portal}}}} | {{stray ent|{{portal}}}} | ||
Line 30: | Line 31: | ||
{{IO|OnFinished|Fired when <code>SetStateFinished</code> is sent to the entity.}} | {{IO|OnFinished|Fired when <code>SetStateFinished</code> is sent to the entity.}} | ||
{{O BaseEntity}} | {{O BaseEntity}} | ||
Revision as of 10:41, 12 January 2024


It indicates items in the world that some NPCs may operate upon.
Keyvalues
- 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: Don't approach
- 1: Walk
- 2: Run
AI_GoalEntity:
- Actor(s) to affect (actor) <target_name_or_class>
- The targetname or classname of any NPCs that will be included in this goal. Wildcards are supported.
- Search Type (SearchType) <choices>
- What the Actor(s) to affect keyvalue targets by.
- 0: Entity Name
- 1: Classname
- Start Active (StartActive) <boolean>
- Set if goal should be active immediately.
Inputs
- 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.
AI_GoalEntity:
- Activate
- Make the goal active if it wasn't already. NPCs will begin taking orders.
- Deactivate
- Make goal inactive.
- UpdateActors !FGD
- Tell the goal entity to re-check Actor(s) to affect in case any disappeared, or any new NPCs spawned.[confirm]
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.