aiscripted_schedule
(Redirected from CAI ScriptedSchedule)
Jump to navigation
Jump to search
Code classes:
CAI_ScriptedSchedule
CBaseEntity
(all ents)
aiscripted_schedule
is a point entity present in all games except the Left 4 Dead games. It issues a command to an NPC without suppressing its normal AI routines, or just to set a readiness state.
Flags[edit | edit source]
- 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.
- 2048: Don't Complain - Suppresses some error messages.
Keyvalues[edit | edit source]
- Target NPC
(m_iszEntity)
<target_name_or_class>
- The targetname or classname of an NPC to command.
- Search Radius (0=everywhere)
(m_flRadius)
<float>
- Radius to search within for an NPC to command. Visualized in Hammer by the yellow sphere/circle.
- All in radius
(graball)
<boolean>
- Whether to grab all matching NPCs in the Search Radius, or just the first one found.
- AI state to set
(forcestate)
<choices>
- Overrides the NPC's current alertness state.
- 0: <None> - don't override
- 1: Idle
- 2: Alert
- 3: Combat
- Schedule to run
(schedule)
<choices>
- Which AI schedule to run.
- 0: <None> - don't run one
- 1: Walk to Goal Entity
- 2: Run to Goal Entity
- 3: Set enemy to Goal Entity
- 4: Walk Goal Path - Make the NPC walk along a path made by
path_track
s. - 5: Run Goal Path - Make the NPC run along a path made by
path_track
s. - 6: Set enemy to Goal Entity and Run to it
- Interruptability
(interruptability)
<choices>
- What can cause the NPC to give up on this schedule. To do: Deprecated?
- 0: General
- 1: Damage or Death
- 2: Death
- Goal entity
(goalent)
<target_destination>
- Name of the entity to move to or attack, if running a schedule. Tip: You can use the schedule entity itself as the goal entity.
Inputs[edit | edit source]
- StartSchedule
- Starts the scripted schedule on the Target NPC.
- StopSchedule (Not in FGD)
- Tells NPC targets to stop running this schedule.