CAI_GoalEntity

From Source Entities
Jump to navigation Jump to search

Code classes:

CAI_GoalEntity is a code class for all NPC "goals", such as following someone or attacking a position.

Keyvalues[edit | edit source]

Actor(s) to affect (actor) <target_name_or_class>
The targetname or classname of any NPCs that will be included in this goal.
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[edit | edit source]

Activate
Make the goal active if it wasn't already. NPCs will begin taking orders.
Deactivate
Make goal inactive.
UpdateActors (Not in FGD)
Usually done automatically. Tell the goal entity to re-check Actor(s) to affect in case any disappeared, or any new NPCs spawned.