I don't need to test my programs. I have an error-correcting modem.
Legacy: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[edit]
These properties are hidden.
- array<ScriptedAction> Actions
- Specifies the list of actions performed by this script (see below)
- class<ScriptedController> ScriptControllerClass
Functions[edit]
(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[edit]
Related Topics[edit]
- Creating and Using ScriptedActions
- ScriptedAction has a full list of actions
- Artificial Intelligence – Super topic on all AI
- Bot Support – Hub for bot support
- Bot Pathing – Concepts and elements of a bot path network
- Strategic Bots – Advanced bot support
- Monster Support – Hub for monster support
- ScriptedPawn – The parent class for all UT NPCs and Monsters
- Bot Support – Hub for bot support
Discussion[edit]
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.