forked from FWGS/hlsdk-portable
-
Notifications
You must be signed in to change notification settings - Fork 10
Scripted Sequences
Roman Chistokhodov edited this page Jun 7, 2024
·
6 revisions
scripted_sequence
sometimes is very clunky to use in Half-Life. Featureful SDK provides a lot of new parameters and flags to get around its limitations, while preserving the original behavior for the sake of compatibility.
This page describes only changes introduced in Featureful SDK. Entity reference for standard Half-Life parameters and spawnflags can be found on twhl wiki.
- The game doesn't crash anymore if
scripted_sequence
is deleted while script is played. -
Target Monster
can be!activator
for chained scripted sequences (use in conjunction withTarget's Activator
parameter). - Technical change:
scripted_sequence
C++ class (CCineMonster
) doesn't inheritCBaseMonster
anymore. Instead, it's based onCBaseDelay
.
- New option for
Move to position
-Teleport
. UnlikeInstantaneous
it does not require scripted sequence to be called twice in order for monster to proceed playing animation.
-
Fire on Possession
- fire a trigger after the monster gets possessed by script. -
Fire after moving
- fire a trigger when the scripted movement is done. -
Fire on Animation start
allows to sync animation start and firing a trigger (e.g. useful for retina scanner animations). Note that save-load in Half-Life resets the animation, but the trigger is designed to fire only once to avoid unwanted side-effects. -
Target's Activator
allows to set activator to either script itself or the possessed monster when triggering a script target at the end of sequence or at the animation start. -
Turn Target
makes monster face the specified target instead of a script entity. -
Turn mode
makes monster turn to script entity position instead of aligning with its facing. -
Move Target
makes monster to walk/run/teleport to the location of the specified entity instead of a script entity. -
Move to radius
makes monster stop moving when they approach the provided distance to the move target. -
Priority
allows a script to possess the monster even if they're currently possessed by another script. -
Required follower state
- the script will play depending on whether the monster is following the player or not. -
Repeat action X more times
repeats an animation multiple times. -
Interruption policy
. The alternative to theNo Interruptions
flag. This can be set toBy Death Only
which would allow to make the script uninterruptable unless the monster dies during the script. TheNo Interruptions
flag should be unmasked in order for policy to work. -
Search policy
. By defaultscripted_sequence
is searching a monster by targetname and then by classname (using the name provided inTarget Monster
). This is usually redundant and can be unwanted. This parameter allows to set whether you want the script to search the monster by targetname only or by classname only. -
Apply search radius
. By default search radius is taken into account only when searching for a monster by a classname. This parameter allows to apply the same behavior when searching the monster by the targetname. -
TakeDamage policy
- set the monster to be invulnerable or not killable during the script. -
Master
- allows to prevent the monster possession until master entity is unlocked.
-
Continuous animation
allows a smooth transition between animations that are meant to play one after another. -
Apply new angles
. If monster turns during the animation, set new angles after sequence finished (example: houndeye's jumpwindow animation). -
Auto-Search
makes thescripted_sequence
to act as if doesn't have a name. This allows to remove the script from the map while in-game with some other entity'sKillTarget
while preserving the behavior of the unnamed script. -
Try once
. By default once triggered the script will continue to search for the target monster if it could not find one instantly. This flag prevents such behavior makingscripted_sequence
do the search only once per firing. If it could not find the appropriate monster, nothing happens. -
Don't reset head turn
. When monster is talking to someone else, the monster turns its head to the listener. By default playingscripted_sequence
on the monster resets the head turn. Use this flag to avoid such behavior. -
Force idle looping
for force idle animation looping even if it doesn't have a loop flag. -
Remove on interruption
. This flag is useful in scripts with idle animation to ensure that the script won't be activated by some external trigger again after it was interrupted by damage dealt to the possessed monster (which could lead to weird situations like monster starting playing the idle animation again).