Aiscripted schedule: Difference between revisions
Jump to navigation
Jump to search
(→Keyvalues: Added placement tip on using the schedule entity as the goal entity) |
m (removed the {{PAGENAME}} only because that was an exceedingly dumb use of it) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:aiscripted_schedule}} | |||
{{toc-right}} | {{toc-right}} | ||
[[Image: | [[Image:aiscripted_schedule.png|left]] | ||
{{base point|aiscripted_schedule}} It issues a command to an [[NPC]] without suppressing its normal AI routines.{{clearleft}} | {{base point|aiscripted_schedule}} It issues a command to an [[NPC]] without suppressing its normal AI routines.{{clearleft}} |
Revision as of 23:59, 31 July 2018
Template:Base point It issues a command to an NPC without suppressing its normal AI routines.
See also
- scripted_sequence (for seizing complete control of the entity)
- Assaults (for combat)
- npc_citizen_fleeing - A prefab that demonstrates scheduled behavior.
Keyvalues
- Target NPC ([todo internal name (i)]) <targetname>
- The name or classname of an NPC to command.
- Search Radius (0=everywhere) ([todo internal name (i)]) <float>
- Radius to search within for an NPC to command.
- All in radius ([todo internal name (i)]) <boolean>
- Whether to grab all matching NPCs in the specified radius, or just the first one found.
- AI state to set ([todo internal name (i)]) <choices>
- Overrides the NPC's current alertness state.
- <None>
- Idle
- Alert
- Combat
- Schedule to run ([todo internal name (i)]) <choices>
- Which AI schedule to run.
- <None>
- Walk to Goal Entity
- Run to Goal Entity
- Set enemy to Goal Entity
- Walk Goal Path
- Run Goal Path
- Set enemy to Goal Entity AND Run to Goal Entity
- Interruptability ([todo internal name (i)]) <choices>
- What can cause the NPC to give up on this schedule?
- General
- Damage or Death
- Death
- Goal entity ([todo internal name (i)]) <targetname>
- Provides the name of a goal entity, used by some schedules.
Placement Tip:You can use the schedule entity itself as the goal entity.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Flags
- Repeatable
- 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.
- Don't Complain: 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
- 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.
- StopSchedule !FGD
- Tells NPC targets to stop running this schedule.