scripted_sequence

A scripted_sequence makes a monster go to a point and play an animation. The script takes its monster when you
trigger it, or when the map starts if the script has no name.
Attributes
The entity also has these common keys:
- Naming and triggering: Name, Target, Delay before trigger and KillTarget
- Position: Pitch Yaw Roll
m_iszEntityNames the monster that plays the script, as the Name of a monster or as a class name such as monster_human_grunt. A class name takes a free monster of that class within Search Radius. Search target monster by... sets which of the two the script tries.
m_flRadiusSets how far from the script, in units, it looks for a monster when Target Monster is a class name. A monster found by its name can be anywhere, unless Test against search radius is "Always".
If you leave this key empty, it is 0 and a class name finds no monster. The Entity to attack of a scripted_action still searches 512 units.
512m_fMoveToSets how the monster gets to the script's position before it plays.
- No (0) - It plays where it stands
- Walk (1) - It walks to the position
- Run (2) - It runs to the position
- Instantaneous (4) - The monster appears at the position, facing the script's angle, at the moment the script takes it
- No - Turn to Face (5) - It plays where it stands and turns to face as Turn mode says
- Teleport (7) - Like Instantaneous, but the monster appears at the position a moment later, when it starts the script, not when the script takes it
No (0)m_iszFireOnPossessedFires when the script takes its monster, with the script as the activator.
m_iszFireOnBeginWith Move to Position "Walk" or "Run", fires when the monster reaches the mark and the script can start, with the script as the activator.
m_iszFireOnAnimStartFires when the Action Animation starts, or for a scripted_action when the action starts, with the script as the activator.
masterNames a master, and while the master is off, the script waits and looks again every second.
m_interruptionPolicySets what breaks the monster out of the script.
- Default (by any damage) (0) - Any damage breaks it out
- No Interruptions (same as flag) (1) - Nothing breaks it out, as with the flag No Interruptions
- By Death Only (2) - Only its death breaks it out
Default (by any damage) (0)m_takeDamagePolicySets what damage does to the monster while the script holds it.
- As usual (0) - Damage hurts it as usual
- Invulnerable during script (1) - It can't be hurt during the script
- Non-lethal damage (2) - Damage hurts it but can't kill it
As usual (0)m_searchPolicySets whether Target Monster is read as a name, a class name or both.
- Targetname, then classname (0)
- Targetname only (1)
- Classname only (2)
Targetname, then classname (0)m_applySearchRadiusSets when the Search Radius applies.
- When searching by classname (0) - Only when the script looks for a monster by its class name
- Always (1) - Also for a monster found by its name, which then has to be within the Search Radius too
When searching by classname (0)required_stateSets the state a monster has to be in for the script to take it.
- Any (0)
- Idle (1)
- Combat (2)
- Alert, Hunt (3)
- Non-combat (Idle, Alert, Hunt) (4)
Any (0)moveto_radiusWith Move to Position "Walk" or "Run", the monster stops this close to the mark and plays there.
If you leave this key empty or set 0, the monster walks onto the mark.
m_fTurnTypeSets how the monster turns before it plays, with Move to Position "Walk", "Run" or "No - Turn to Face". With "Teleport" or "Instantaneous", it takes the script's angle, and with "No", it doesn't turn.
- Match turn target's angle (0) - It turns to the angle of the script
- Turn to target (1) - It turns to face the script
- Don't Turn (2) - It doesn't turn
Match turn target's angle (0)m_iPrioritySets whether the script can take a monster that is playing another script.
- Normal (0) - It only takes a monster that plays no other script
- Override other sequences (4) - It also takes a monster that is playing another script
Normal (0)m_iRepeatsSets how many more times the Action Animation, or the action of a scripted_action, plays.
0m_iszPlaySets the animation that the monster plays when you trigger the script. If the script has no name, the monster plays it at once.
m_iszIdleSets the animation that the monster plays while it waits at the script for the trigger.
If you leave this key empty, a script that has a Name doesn't take its monster until you trigger it.
Flags
4RepeatableThe script stays after it finishes, so it can run again. Without this flag, it removes itself when its animation ends
8Leave CorpseA monster that dies during the script leaves its corpse where it fell, instead of fading out
32No InterruptionsNothing interrupts the monster during the script, neither damage nor enemies
64Override AIThe script takes the monster also when it is alert or fighting. Without this flag, it only takes an idle monster
128No Script MovementAfter the animation, the monster stays where it started, and doesn't move to where the animation ended
1024Auto-searchThe script looks for its monster within its radius when the map starts, as a script without a name does, also if it has a name
4096Try search onceWhen you trigger the script, it looks for its monster once. If the monster isn't there, the script stops and doesn't look again every second
8192Don't reset head turnA Scientist or a Cop keeps its head turned the same way while the script plays, and doesn't look straight ahead
16384Force idle animation loopingThe Idle Animation starts again each time it ends, also if the model doesn't loop it
32768Remove on interruptionThe script removes itself when its monster breaks out of it, for example when the monster is hurt or sees an enemy
65536Don't Drop to FloorAfter the animation, the monster stays at the height where the animation ended, and doesn't drop to the floor
131072Allow stuckAfter the animation, the monster keeps its end position also if it is inside a wall or another solid. Without this flag, it goes back to where it started
262144Allow unnamed idleA script without a name that has an Idle Animation plays the idle and waits for a trigger before its action. Without this flag, it starts at once
524288Allow Take Damage TriggerConditionThe monster's Trigger Condition "Take Damage" fires when it is hurt during the script, also while the script ignores interruptions
See also
aiscripted_sequence- a script that doesn't take the monster out of its AIscripted_action- a script that makes the monster attack, reload or jumpscripted_sentence- makes a monster say a sentence- scripted_sequence on TWHL - the Half-Life entity
Changes since 1.38
- Fixed a
scripted_sequencewith Move to Position "No - Turn to Face" hanging the script. The game did not know this choice. This was a bug in SBO 1.38 - You can use the new Move to Position choice "Teleport"
- Fixed a
scripted_sequencethat a Kill target removes while its monster waits for it or plays it crashing the server. The monster still pointed to the removed sequence. This was a bug in SBO 1.38 - You can use the new keys Fire on Possession, Fire after moving, Fire on Animation start, Master, Interruption policy, TakeDamage policy, Search target monster by..., Test against search radius, Required MonsterState, Move to target's radius, Turn mode, Priority and Repeat action X more times
- You can use the new flags Auto-search, Try search once, Don't reset head turn, Force idle animation looping, Remove on interruption, Don't Drop to Floor, Allow stuck, Allow unnamed idle and Allow Take Damage TriggerCondition