| Home Page | Recent Changes

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 udncontent logo UDN: ScriptedSequenceActions for additional information.

Properties

These properties are hidden.

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

Functions

(incomplete)

SpawnControllerFor( Pawn P )
Spawn and initialize an AI Controller (called by a non-player controlled Pawn at level startup) It immediately calls TakeOver().
TakeOver( Pawn P )
Spawn a scripted controller, which temporarily takes over the actions of the pawn, unless pawn is currently controlled by a scripted controller - then just change its script
SetActions( ScriptedController C )

Known Subclasses

Related Topics

Discussion

AlphaOne: I've tried to script the invasion monsters (Monster.uc) using a ScriptedAction. I could make the monster go to certain places, but I could never get the Monster to stop following the script (using ACTION_LeaveSequence). When the script ended, the monsters just stood there idling. I want them to start attacking the player as they would without the script. It would be even better if the script could be interrupted while its still excecuting.

I tried many things:

  • changing the team of the monsters
  • changing their alertness
  • ACTION_LeaveSequence
  • using differnet controller types for this ScriptedAction - I think only ScriptedController, otherwise the monsters never follow the script at all.
  • I tried coding an action which would change the monsters controller, still nothing.

What I basically wantto do is make the monsters

  • patrol an area
  • guard an area(spot) - with little movement away from the area(spot)

TwelveBaud: Did you try the usual monster AI? Example given: Set up a PatrolPoint and set the monsters' state to Patrolling?

SuperApe: I believe AlphaOne is talking about UT200x, not UT. In UT, Monsters were a subclass of ScriptedPawn, which contains their AI, including a Patrol state. In UT2004, Invasion Monsters, a subclass of Monster, contains no AI and are controlled by a MonsterController. This is where the problem lies, AlphaOne. You are using ScriptedSequence's ScriptedController and there's no ScriptedAction available to switch (Possess) controllers. I've just done some experiments on this and, after doing all those things you tried, I realized that custom ScriptedActions needed to be made to get UT2004 Monsters to follow a ScriptedSequence, leave it to be controlled by a MonsterController and return later to the ScriptedSequence. This would mimic the abilities that were available in UT via ACTION_SetAlertness. I will be writing up a tutorial on this and linking to it from Monster Support, check A UT2004 Monster Tutorial.

SuperApe: BTW, we need a Basic ScriptedPawn Tutorial for UT. Who's up for that?


Category Class (UT2003)

Category Class (UT2004)

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In