Limited support
This feature is only present in Portal 2: Community Edition and Portal: Revolution.

POINT scripted_sequence

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.

If the sequence has motion extraction in it, set the 'Don't Teleport NPC On End' spawnflag.

KeyValues

Target NPC <target_destination>

The name or class name (such as 'npc_zombie') of an NPC to use for this script.

Pre Action Idle Animation <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.

Entry Animation <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.

Action Animation <string>

The name of the main sequence (such as 'reload02') or activity (such as 'ACT_RELOAD') to play.

Post Action Idle Animation <string>

The name of the sequence (such as 'idle01') or activity (such as 'ACT_IDLE') to play after the action animation. If the ''Loop in Post Idle'' spawnflag is not ticked, this will act as an Exit Animation, similar to the Entry Animation.

Custom Move 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.

Loop Action Animation? <boolean> = No

Loops the action animation until the sequence is cancelled or interrupted.

Synch Post Idles? <boolean> = No

No description provided.

Search Radius (0=everywhere) <integer> = 0

Radius to search within for an NPC to use. 0 searches everywhere.

Repeat Rate ms <integer> = 0

No description provided.

Move to Position <choices> = Walk (1)

No description provided.

Possible Values:

Name Value
No 0
Walk 1
Run 2
Custom movement 3
Instantaneous 4
No - Turn to Face 5

On player death <choices> = Do Nothing (0)

What should this entity do if the player dies

Possible Values:

Name Value
Do Nothing 0
Cancel Script and return to AI 1

Next Script <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.

Ignore Gravity on NPC during script <boolean> = No

If this is set to 'Yes', the NPC will not be subject to gravity while playing this script.

Disable NPC collisions during script <boolean> = No

Useful for when NPCs playing scripts must interpenetrate while riding on trains, elevators, etc. This only disables collisions between the NPCs in the script and must be enabled on BOTH scripted_sequences.

spawnflags <flags>

No description provided.

Possible Flags:

Name Value Default
Repeatable 4
Leave Corpse 8
Start on Spawn 16
No Interruptions 32
Override AI 64
Don't Teleport NPC On End 128
Loop in Post Idle 256
Priority Script 512
Search Cyclically 1024
Don't Complain 2048
Allow actor death without stopping scene 4096

Inherited from BaseEntityPoint

Name <target_source>

The name that other entities refer to this entity by.

Global Entity Name <string>

Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.

Pitch Yaw Roll (X Y Z) <angle> = 0 0 0

This entity's orientation in the world. Roll is the rotation around the X axis, pitch is rotation around the Y axis and yaw is the rotation around the Z axis.

Parent <target_destination>

The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. Set an attachment point via 'parentname,attachment'.

Inherited from SystemLevelChoice

Minimum CPU Level <choices> = default (low) (0)

No description provided.

Possible Values:

Name Value
default (low) 0
low 1
medium 2
high 3

Maximum CPU Level <choices> = default (high) (0)

No description provided.

Possible Values:

Name Value
default (high) 0
low 1
medium 2
high 3

Minimum GPU Level <choices> = default (very low) (0)

No description provided.

Possible Values:

Name Value
default (very low) 0
very low 1
low 2
medium 3
high 4

Maximum GPU Level <choices> = default (high) (0)

No description provided.

Possible Values:

Name Value
default (high) 0
very low 1
low 2
medium 3
high 4

Inputs

BeginSequence <void>

Summons an NPC to act out the scripted sequence.

MoveToPosition <void>

Summons an NPC to the script location. They will play their scripted idle (or ACT_IDLE if none is specified) until BeginSequence is triggered.

CancelSequence <void>

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.

Inherited from BaseEntityPoint

Kill <void>

Removes this entity from the world.

KillHierarchy <void>

Removes this entity and all its children from the world.

SetParent <target_destination>

Changes the entity's parent in the movement hierarchy.

SetParentAttachment <string>

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.

SetParentAttachmentMaintainOffset <string>

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.

ClearParent <void>

Removes this entity from the the movement hierarchy, leaving it free to move independently.

SetLocalAngles <vector>

Sets the rotation of the entity relative to the parent's rotation.

SetLocalOrigin <vector>

Sets the position of the entity relative to its parent if one exists. Otherwise relative to the world.

SetAbsAngles <vector>

Set this entity's angles, always relative to the world origin.

AddOutput <string>

Adds an entity I/O connection to this entity or changes keyvalues dynamically. Format: '<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite, 1 = only once)>' or 'keyvalue newval'. Very dangerous, use with care.

FireUser1 <void>

Causes this entity's OnUser1 output to be fired.

FireUser2 <void>

Causes this entity's OnUser2 output to be fired.

FireUser3 <void>

Causes this entity's OnUser3 output to be fired.

FireUser4 <void>

Causes this entity's OnUser4 output to be fired.

Use <void>

More or less replicates the player interacting with an entity. (+USE)

PassUser1 <string>

Causes this entity's OutUser1 output to be fired, passing along the parameter unchanged.

PassUser2 <string>

Causes this entity's OutUser2 output to be fired, passing along the parameter unchanged.

PassUser3 <string>

Causes this entity's OutUser3 output to be fired, passing along the parameter unchanged.

PassUser4 <string>

Causes this entity's OutUser4 output to be fired, passing along the parameter unchanged.

FireRandomUser <void>

Fires OnUser1, OnUser2, OnUser3, or OnUser4 with a 25% chance of each.

PassRandomUser <string>

Fires OutUser1, OutUser2, OutUser3, or OutUser4 with a 25% chance of each. The parameter is passed along unchanged.

KillIfNotVisible <void>

Removes this entity if it is not in a player's viewcone.

KillWhenNotVisible <void>

Removes this entity when it is not in a player's viewcone. You can pass a time for when this should start.

FireOutput <string>

Fires the named output on this entity. Format: '<output name>:<activator>:<caller>:<parameter>:<delay>' (OnDeath:hl3cardgame:gaben). Everything beyond the output name is optional.

RemoveOutput <string>

Removes all instances of the named output on this entity. Wildcards are supported, meaning you could just pass '*' to wipe all outputs from this entity.

AcceptInput <string>

Fires the named input on this entity. Format: '<input name>:<parameter>:<activator>:<caller>:<output ID>' (SetTarget:cheese). Everything beyond the input name is optional. Mind the fact this is arranged differently from FireOutput, having the parameter right after the input name.

CancelPending <void>

Cancels any events fired by this entity that are currently pending in the I/O event queue.

FreeChildren <void>

Unparents all direct children of this entity.

SetLocalVelocity <vector>

Sets this entity's current velocity.

SetLocalAngularVelocity <vector>

Sets this entity's current angular velocity.

AddSpawnFlags <integer>

Adds spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.

RemoveSpawnFlags <integer>

Removes spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.

AddSolidFlags <integer>

Adds solid flags to this entity.

RemoveSolidFlags <integer>

Removes solid flags from this entity.

ChangeVariable <string>

Similar to AddOutput, except it changes an internal variable similar to logic_datadesc_accessor instead. Very dangerous, use with care.

SetHealth <integer>

Sets this entity's health.

AddHealth <integer>

Adds to this entity's health.

RemoveHealth <integer>

Removes from this entity's health.

SetMaxHealth <integer>

Sets this entity's max health.

SetEntityName <target_destination>

Sets this entity's name that other entities should refer to it by.

SetTarget <target_destination>

Sets this entity's target. This is specific to certain entities, particularly logic entities that involve a target.

SetOwnerEntity <target_destination>

Sets this entity's owner entity. This has nothing to do with parenting and has more to do with collision and kill credits.

SetThinkNull <void>

Sets this entity's general think function to null. Behavior varies from entity to entity..

Touch <target_destination>

Simulates this entity touching the specified entity.

Outputs

OnBeginSequence <void>

Fires when the action animation begins playing.

OnEndSequence <void>

Fires when the action animation completes.

OnCancelSequence <void>

Fires when the sequence is cancelled.

OnCancelFailedSequence <void>

Fires when the sequence is cancelled without ever playing (OnCancelSequence will also fire).

OnScriptEvent01 <void>

Fires when a 'trigger' anim event occurs while playing the script. Use { event 1003 framenum 1 } in the QC.

OnScriptEvent02 <void>

Fires when a 'trigger' anim event occurs while playing the script. Use { event 1003 framenum 2 } in the QC.

OnScriptEvent03 <void>

Fires when a 'trigger' anim event occurs while playing the script. Use { event 1003 framenum 3 } in the QC.

OnScriptEvent04 <void>

Fires when a 'trigger' anim event occurs while playing the script. Use { event 1003 framenum 4 } in the QC.

OnScriptEvent05 <void>

Fires when a 'trigger' anim event occurs while playing the script. Use { event 1003 framenum 5 } in the QC.

OnScriptEvent06 <void>

Fires when a 'trigger' anim event occurs while playing the script. Use { event 1003 framenum 6 } in the QC.

OnScriptEvent07 <void>

Fires when a 'trigger' anim event occurs while playing the script. Use { event 1003 framenum 7 } in the QC.

OnScriptEvent08 <void>

Fires when a 'trigger' anim event occurs while playing the script. Use { event 1003 framenum 8 } in the QC.

Inherited from BaseEntityPoint

OnUser1 <void>

Fired in response to FireUser1 input.

OnUser2 <void>

Fired in response to FireUser2 input.

OnUser3 <void>

Fired in response to FireUser3 input.

OnUser4 <void>

Fired in response to FireUser4 input.

OutUser1 <string>

Fires in response to PassUser1 input, with the parameter passed through unchanged.

OutUser2 <string>

Fires in response to PassUser2 input, with the parameter passed through unchanged.

OutUser3 <string>

Fires in response to PassUser3 input, with the parameter passed through unchanged.

OutUser4 <string>

Fires in response to PassUser4 input, with the parameter passed through unchanged.