Канал в IRC
RusNet: #cmt
Scripted_sequence

Scripted_sequence

Table of contents
1 Entity Description
2 Keyvalues
3 Flags
4 Inputs
5 Outputs
6 See Also

Entity Description

Grabs an NPC and makes them play a specified set of animations. The NPC can be told to move to the scripted sequence position or can be told to play the script wherever they currently are. Multiple scripted sequences of the same name will frame-synchronize in the action animation once all the actors have moved to position. This allows tight interaction between actors (one actor grabbing another, hitting them, etc.) The flow is as follows:

  1. Move to position using the specified movement animation. If 'Move to Position' is set to NONE, skip to step 2.
  2. If forced to wait for another actor to move to position, play the pre-action idle animation, otherwise skip to step 3. If there is no pre-action idle specified, ACT_IDLE is used.
  3. Fire the OnBeginSequence output.
  4. Play the action animation. If no action animation is specified, skip to step 5.
  5. Play the post-action idle animation. If none is specified, skip to step 6. If the 'Loop in Post Idle' spawnflag is set, keep playing the post-action idle until the script is cancelled. If no post-action idle animation is specified, ACT_IDLE is used.
  6. Fire the OnEndSequence output.
  7. If a next script to play is specified, hand the NPC to the next script and repeat this process for that script.

The MoveToPosition input runs steps 1 and 2, then waits while playing the pre-action idle animation until the BeginSequence input is received.


Keyvalues

<target_source> The name that other entities refer to this entity by.
<target_destination> The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
<angle> This entity's angular orientation in the world (also used for angular effect entities).
<choices> Minimum DX Level
Literal Value Description
0 default (lowest)
70 dx7
<choices> Maximum DX Level
Literal Value Description
0 default (lowest)
60 dx6
<target_destination> The name or class name (such as 'npc_zombie') of an NPC to use for this script.
<string> The name of the sequence (such as 'idle01') or activity (such as 'ACT_IDLE') to play before the action animation if the NPC must wait for the script to be triggered. Use 'Start on Spawn' flag or MoveToPosition input to play this idle animation.
<string> The name of the main sequence (such as 'reload02') or activity (such as 'ACT_RELOAD') to play.
<string> The name of the sequence (such as 'idle01') or activity (such as 'ACT_IDLE') to play after the action animation.
<string> Used in conjunction with the 'Custom movement' setting for the 'Move to Position' property, specifies the sequence (such as 'crouch_run01') or activity (such as 'ACT_RUN') to use while moving to the scripted position.
<float> Radius to search within for an NPC to use. 0 searches everywhere.
<float> Repeat Rate ms
<choices> Move to Position"
Literal Value Description
0 No
1 Walk
2 Run
3 Custom movement
4 Instantaneous
5 No - Turn to Face
<target_destination> The name of the script to run immediately after this script completes. The NPC will not return to AI between the two scripts.
<string> The name of the sequence (such as 'reload02') or activity (such as 'ACT_RELOAD') to play when the sequence starts, before transitioning to play the main action sequence.
<boolean> Loop Action Animation?
<boolean> Synch Post Idles?
If set, NPC will cancel script and return to AI

Flags


Inputs

Removes this entity from the world.
Removes this entity and all its children from the world.
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
Changes the entity's parent in the movement hierarchy.
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.
Removes this entity from the the movement hierarchy, leaving it free to move independently.
Summons an NPC to act out the scripted sequence.
Summons an NPC to the script location. They will play their scripted idle (or ACT_IDLE if none is specified) until BeginSequence is triggered.
Stops the scripted sequence. If fired after a sequence starts, this input will not take effect until the NPC finishes playing the scripted action animation.

Outputs

Fired in response to FireUser1-4 inputs. See User Inputs and Outputs. !activator = activator
Fires when the action animation begins playing.
Fires when the action animation completes.
Fires when a 'trigger' anim event occurs while playing the script. Use { event 1003 framenum (1-8) } in the QC.

See Also

Добавил ivan_cool


К оглавлению справочника

© Valve Developer Community
CMT (CS Mapping Tutorials) - © 2006-2011. Created by VM
[ Script Execution time: 0.0009 ]