| Home Page | Recent Changes | Preferences

# ScriptedSequence

UT2003 :: Object >> Actor >> Keypoint >> AIScript >> ScriptedSequence

Used by Level Designers to specify special AI scripts for pawns placed in a level, and to change which type of AI controller to use for a pawn. AIScripts can be shared by one or many pawns. Game specific subclasses of AIScript will have editable properties defining game specific behavior and AI.

Scripted sequences are sort of like macros in Microsoft Access: They are built up from preset actions which can have parameters. The actual "actions" are the subclasses of ScriptedAction, and their class names all start with "Action_...".

- Place UnrealScriptedSequence actors in your map to have defending or freelancing bots automatically follow certain scripted orders.
- Use ScriptedTrigger actors to execute stand-alone scripts.

There are even simple means for flow control available within a scripted sequence (see below).

See UDN: ScriptedSequenceActions for additional information.

## Properties

array<ScriptedAction> Actions
  Specifies the list of actions performed by this script (see below).

## Available Actions

- Latent actions stop the execution flow of the scripted sequence until their task has been finished.
- Several actions by design can't be used with a ScriptedTrigger. They're marked separately below.

### Environment Control

Action Class | Latent? | ScriptedTrigger? | Purpose
ACTION_ChangeLevel? | No | Yes | Sends the server to another level.
ACTION_DestroyActor? | No | Yes | Destroys all Actors with a given Tag.
ACTION_PlayAmbientSound? | No | Yes | Plays an ambient sound.
ACTION_SetCorona? | No | Yes | Sets the bCorona property for all Actors with a given Tag.
ACTION_SetHidden? | No | Yes | Sets the bHidden property for all Actors with a given Tag.
ACTION_SpawnActor? | No | Yes | Spawns an Actor.
ACTION_TriggerEvent? | No | Yes | Fires the given Event.

### Player Control

#### General

Action Class | Latent? | ScriptedTrigger? | Purpose
Action_ConsoleCommand? | No | Yes | Executes a console command on the server for the instigator.
ACTION_DamageInstigator? | No | Yes | Inflicts damage on the instigator.
ACTION_DestroyPawn? | No | No | Destroys the instigator's Pawn.
ACTION_ForceMoveToPoint? | No | Yes | Instantaneously moves the instigator to the specified point.
ACTION_KillInstigator? | No | Yes | Kills the instigator with a given DamageType.
ACTION_PlaySound? | No | Yes | Plays a sound.
ACTION_SetPhysics? | No | Yes | Sets the instigator's physics mode.
ACTION_TeleportToPoint? | No | Yes | Instantly teleports the instigator to a given destination, optionally displaying a respawn/teleportation effect.

#### Human Players

Action Class | Latent? | ScriptedTrigger? | Purpose
ACTION_DisplayMessage? | No | Yes | Sends a message to the instigator or all players.
ACTION_FadeView? | Yes | Yes | Fades the instigator's view to a given constant color.
ACTION_GotoMenu? | No | Yes | Opens a given menu on the first found human player's screen.
ACTION_LocalizedMessage? | No | Yes | Displays a certain LocalMessage on the instigator's screen.
ACTION_PlayLocalSound? | No | Yes | Plays a sound for all human players in the game.
ACTION_PlayMusic? | No | Yes | Sets the music for either the instigator only or all human players in the game.

#### ScriptedControllers and Bots

Action Class | Latent? | ScriptedTrigger? | Purpose
ACTION_ChangeTeam? | No | Yes | Changes the instigator's team.
ACTION_ChangeWeapon? | No | Yes | Changes the instigator's Weapon (if present in his/her inventory).
ACTION_Crouch? | No | No | Tells the instigator to start crouching (as opposed to walking or running).
ACTION_FinishRotation? | Yes | Yes | Waits until the instigator has finished rotating towards its goal.
ACTION_FireWeapon? | No | Yes | Tells the instigator to fire its current weapon.
ACTION_Freeze? | Yes | Yes | Freezes the instigator.
ACTION_FreezeOnAnimEnd? | No | Yes | Freezes the instigator after its current animation has ended.
ACTION_Jump? | No | Yes | Makes the instigator jump or dodge.
ACTION_MoveToPlayer? | Yes | No | Makes the instigator go to its associated player.
ACTION_MoveToPoint? | Yes | No | Makes the instigator go to a specified Actor specified by its Tag, or the UnrealScriptedSequence actor's location itself if none is specified.
ACTION_PlayAnim? | No | No | Plays an animation for the instigator.
ACTION_Run? | No | No | Tells the instigator to start running (as opposed to walking or crouching).
ACTION_SetAlertness? | No | No | Sets the instigator's alertness.
ACTION_SetViewTarget? | No | No | Tells the instigator to focus on the actor specified by a given Tag.
ACTION_ShootTarget? | No | Yes | Tells the instigator to start shooting its current target.
ACTION_StopAnimation? | No | No | Stops the instigator's current animation.
ACTION_StopShooting? | No | Yes | Tells the instigator to stop shooting its current target.
ACTION_ThrowWeapon? | No | Yes | Tells the instigator to throw its weapon.
ACTION_TurnTowardPlayer? | No | No | Tells the instigator to turn towards its associated player.
ACTION_Walk? | No | No | Tells the instigator to start walking (as opposed to running or crouching).

### Flow Control

- Scripted sequences can contain conditional blocks. A conditional block starts with an ACTION_IfCondition? or an ACTION_IfRandomPct? and ends at an ACTION_EndSection?. Blocks can be nested.
- There is support for loops built into the code, but no scripted action that exposes that functionality in UnrealEd.

Action Class | Latent? | ScriptedTrigger? | Purpose
ACTION_ChangeScript? | No | No | Continues execution with a different script.
ACTION_EndSection? | No | Yes | Marks the end of a section of script actions.
ACTION_GotoAction? | No | Yes | Jumps to a given action number within the current sequence.
ACTION_IfCondition? | No | Yes | Skips all actions up to the next [section end]? unless a given TriggeredCondition? is enabled.
ACTION_IfRandomPct? | No | Yes | Skips all actions up to the next [section end]? with a given probability.
ACTION_LeaveSequence? | No | Yes | Stops this scripted sequence.
ACTION_WaitForAnimend? | Yes | No | Waits until the instigator's current animation has ended.
ACTION_WaitForEvent? | Yes | Yes | Waits until the given Event has been fired.
ACTION_WaitForPlayer? | Yes | No | Waits until the instigator is within a given distance of its associated player.
ACTION_WaitForTimer? | Yes | Yes | Waits until a given number of seconds has elapsed.

## Known Subclasses

- BulldogTrigger?
- ScriptedTrigger
- UnrealScriptedSequence

## Related Topics

- Creating and Using ScriptedActions

Category Class (UT2003)

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

Mapping Topics

Mapping Lessons

UnrealEd Interface

Questions&Answers

Scripting Topics

Scripting Lessons

Making Mods

Class Tree

Questions&Answers

Modeling Topics

Questions&Answers

Log In