Aiscripted schedule

From Valve Developer Community

Table of contents

Entity Description

Issues a command to an NPC without taking the NPC out of its AI. This does not seize control of the NPC as a scripted_sequence does.

Keyvalues

Defines the name that other entities refer to this entity by.
  • hammerid [Episode Two Update]
<integer readonly> This id is used for debugging purposes in Hammer.
  • m_iszEntity
<target_destination> The name or classname of an NPC to use.
  • m_flRadius
<float> Radius to search within for an NPC to use. 0 searches everywhere.
  • graball
<boolean> Whether to grab all matching NPCs in the specified radius, instead of just one.
  • forcestate
<choices> AI state to set
Literal Value Description
0 <None>
1 Set state to IDLE
2 Set state to ALERT
3 Set state to COMBAT
  • schedule
<choices> Schedule to run
Literal Value Description
0 <None>
1 Walk to Goal Entity
2 Run to Goal Entity
3 Set enemy to Goal Entity
4 Walk Goal Path
5 Run Goal Path
6 Set enemy to Goal Entity AND Run to Goal Entity
  • interruptability
<choices>
Literal Value Description
0 General
1 Damage or Death
2 Death
  • goalent
<target_destination> Provides the name of a schedule-specific goal entity. (See the shedule (Schedule to run) keyvalue.)

Flags

  • 4 : Repeatable
  • 1024 : Search Cyclically
If the target parameters can apply to more than one entity, the aiscripted_schedule will normally select one of these targets to affect at random each time it is triggered. Checking this flag will instead make it cycle through a list of them, affecting all the entities in order as it is triggered. This is useful for making sure that every member of the group will eventually be affected, especially when targeting the schedule to affect multiple spawns.
  • 2048 : Don't Complain
If set, the following messages will be suppressed:
  • Found <entity>, but can't play!
  • ScheduledMoveToGoalEntity to goal entity <entity> failed
    Can't execute script <this>
  • ScheduledFollowPath to goal entity <entity> failed
    Can't execute script <this>

Inputs

  • Kill
Removes this entity from the world.
Removes this entity and all its children from the world.
  • AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
  • StartSchedule
Starts the scripted schedule. This will first locate an NPC that matches the given target, then tell the NPC to run the specified schedule.

Outputs

Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
!activator = activator

See also