Using the
scripted_sequence entity as base, the
aiscripted_sequence
point entity inherit the same responsibility of making a monster entity move to a specific location and/or perform a given animation. The primary difference being that it completely overrides the targeted monster's AI. Regardless of what you do to the monster, it will follow this sequence.
Attributes
- Target (target) - The entity name to trigger after the scripted animation is performed (or, in case the "Action Animation" is not specified, after the monster moved to the script).
- Delay before trigger (delay) - "Target" and "KillTarget" will be triggered this many seconds after the animation is performed.
- KillTarget (killtarget) - When the sequence is completed, the entity that is specified in "KillTarget" will be removed from the game.
- Name (targetname) - Name is a general attribute used to identify entities.
- Pitch Yaw Roll (Y Z X) (angles) - The monster will turn to face the given yaw angle before performing the animation. Pitch and roll are not used.
- Target Monster (m_iszEntity) - The name of the monster entity that this sequence affects. You can also input a monster classname (monster_scientist, for example). (Only one monster will be chosen to follow the sequence.)
- Action Animation (m_iszPlay) - The name of the animation that will be performed by "Target Monster".
- Idle Animation (m_iszIdle) - Won't work for
aiscripted_sequence
as the code playing the animation is commented. Use scripted_sequence instead if you need this.
- Search Radius (m_flRadius) - If you input a monster classname into "Target Monster", the entity will pick a monster within this radius of the entity to follow the sequence. If none are within the radius, the first monster to enter the radius will follow the sequence.
- Repeat Rate ms (m_flRepeat) - How often to check if a monster is within the search radius. A check will be made even if search radius is zero, so set this to a large value if it's not used.
- Move to Position (m_fMoveTo) - Sets how (or if) the monster moves before performing the animation:
- No (0) - The monster will not move or turn. It will perform the animation wherever it is.
- Walk (1) - The monster will walk to the
aiscripted_sequence
, then perform the animation.
- Run (2) - The monster will run to the
aiscripted_sequence
, then perform the animation.
- Instantaneous (4) - The monster will instantly warp to the location of the
aiscripted_sequence
and perform the animation.
- No - Turn to Face (5) - The monster will not move, but will turn to the
aiscripted_sequence
's angle before performing the animation.
- AI Schedule when done (m_iFinishSchedule) - Defines what happens to the monster's AI when the sequence is completed/canceled.
- Default (0) - The AI will order the monster to clear it's schedule (kinda like a "reset"). It will resume normal behavior afterwards.
- Ambush (1) - The AI will order the monster to go into an "ambush" schedule. That is to wait for an infinite period of time unless it see an enemy or take damage.
Flags
- Repeatable (4) - If enabled, the sequence can be repeated more than once. Otherwise the entity will be removed once the sequence is complete.
- Leave Corpse (8) - If enabled, the monster leave it's corpse instead of fading out. This is only noticeable in-between two
aiscripted_sequence
when the monster is on a dying state.
- No Interruptions (32) - Has no effect for
aiscripted_sequence
since it assumes this is always enabled. The scripted_sequence equivalent says: "if enabled, the sequence cannot be interrupted. The monster will ignore damage until the sequence is complete".
- Override AI (64) - Has no effect for
aiscripted_sequence
since it assumes this is always enabled. The scripted_sequence equivalent says: "if enabled, the script will possess its target even when the monster is in the combat state at the moment of the call".
- No Script Movement (128) - If enabled, when the sequence is completed, the monster will be placed back where the "Action Animation" started (if the animation would cause the monster to move).
Notes
- Using "Idle Animation" with this entity might cause problems, it's best to use scripted_sequence instead.
- You can use a model viewer to see the animations available to each monster.
- If using the "Instantaneous" movement type, the script will freeze the monster after it is teleported. Trigger the script again to continue the script. The second trigger cannot be at the same time as the first trigger. However, 0.1 second delay is already enough.
- As mentioned above, a scripted_sequence with both spawnflags "No Interruptions" and "Override AI" is a near perfect equivalent to this entity.
Related Pages
m_iFinishSchedule
set to Default AI (0
), but will wait until the vent is broken when that keyvalue is set to Ambush (1
).