Download presentation
Presentation is loading. Please wait.
1
Unreal Scripted Sequences
CIS 488/588 Bruce R. Maxim UM-Dearborn 11/21/2018
2
NPC Control You can tell a bot to use a button to start a door pressing animation Scripted sequences have an Actions list the controls their behavior under the AIScript category in their properties list Action lists can have conditionals and loops Actions can be latent (pause after executing) or non-latent (no delay before next action) 11/21/2018
3
Using a Scripted Trigger - 1 Tutorial 14.1
Use the map file Tutorial14_01_Start.ut2 This tutorial creates a UseTrigger that plays a sound, opens a door, and turns on a caution light Open the Actor class browser, expand Triggers, and select UseTrigger Add the UseTrigger in front of the door 11/21/2018
4
Using a Scripted Trigger - 2 Tutorial 14.1
Open the Actor class browser, expand KeyPoint>AIScript>ScriptedSequence, and select ScriptedTrigger Add the ScriptedTriggeer next to the UseTrigger in front of the door Open the Properties window for the Use Trigger, expand th Events category, and type MultiTrigger as the value of Event property 11/21/2018
5
Using a Scripted Trigger - 3 Tutorial 14.1
Open the Properties window for the ScriptedTrigger, expand the AIScript, and enter the actions list Rebuild the level, save, and test 11/21/2018
6
ScriptedTrigger Actions Tutorial 14.1
Index Actions Property Values Action_WAITFOREVENT ExternalEvent = MultiTrigger 1 Action_PLAYSOUND Sound = IndoorAmbienceDoor10 2 Action_TRIGGEREVENT Event = BlastDoor 3 Action_TriggerEvent Event = CautionLight 11/21/2018
7
Controlling a Pawn - 1 Tutorial 14.2
Use map file Tutorial14_02_Start.ut2 The NPC will runs to the Player, beckons for the player to follow, and then opens the door (several PathNodes are already in the map) Open Actor class browser, expand Pawn>UnrealPawn, and select xPawn Move the xPawn to the lower right of the level, near the PathNode, rotate the xPawn to face the PathNode 11/21/2018
8
Controlling a Pawn - 2 Tutorial 14.2
Open the Actor class browser, expand Keypoint>AIScript, and select ScriptedSequence Place the ScriptedSequence next to xPawn Open Properties window, expand the Events category, and set Tag to PawnController Expand the AIScript category and set the ControllerClass property to ScriptedController 11/21/2018
9
Controlling a Pawn - 3 Tutorial 14.2
Open the xPawnProperties window, expand the AI category, and set AIScriptTag to PawnController Open the Properties window of the ScriptedSequence, expand the AIScript category, and add the actions list Rebuild the path, save, and test 11/21/2018
10
Actions for ScriptedSequence – 1 Tutorial 14.2
Index Action Property Values Action_WAITFOREVENT ExternalEvent = CallNPC 1 Action_MOVETOPOINT DestinationTag = CallPoint 2 Action_TURNTOWARDPLAYER N/A 3 Action_WAITFORTIMER PuseTime = 0.5 11/21/2018
11
Actions for ScriptedSequence – 2 Tutorial 14.2
Index Action Property Values 4 Action_PLAYANIM BaseAnim = gesture_beckon 5 Action_WAITFORANIMEND N/A 6 Action_SETVIEWTARGET ViewTargetTag = ConsoleTarget 7 Action_MOVETOPOINT PauseTime = 0.2 11/21/2018
12
Actions for ScriptedSequence – 3 Tutorial 14.2
Index Action Property Values 8 Action_WAITFORTIMER BaseAnim = gesture_beckon 9 Action_PLAYANIM N/A 10 Action_SETVIEWTARGET BaseAnim = gesture_halt 11 Action_MOVETOPOINT Event = BlastDoor 11/21/2018
13
Matinee – ScriptedSequences Tutorial 14.3
I have not worked with matinee yet 11/21/2018
14
Using if Conditions - 1 Tutorial 14.4
Use map file Tutorial14_04_Start.ut2 We’ll set up a scripted sequence to make the pawn run over to a PathNode to send a message to a triggered condition Add a ScriptedSequence actor next to the existing Trigger Open the Properties window, expand AIScript category, and set ControllerClass to ScriptedController 11/21/2018
15
Actions for ScriptedSequence Tutorial 14.4
Index Action Property Values Action_WAITFOREVENT ExternalEvent = CallBot 1 Action_WALK N/A 2 Action_SETVIEWTARGET ViewTargetTag = BotPanel 3 Action_MOVETOPOINT DestinatioonTag = Switchpoint 11/21/2018
16
Actions for ScriptedSequence Tutorial 14.4
Index Action Property Values 4 Action_WAITFORTIMER PauseTime = 0.2 5 Action_PLAYANIM BaseAnim = gesture_halt 6 Action_WAITFORANIMEND N/A 7 Action_TRIGGEREVENT Eveent = IC_DoorControl 11/21/2018
17
Using if Conditions – 2 Tutorial 14.4
Open the Property window for the xPawn, expand the AI category, and check the value of AIScriptTag (should be NPCScript) Return to the Property window of the ScriptedSequence, expand the Events category, and set Tag ot NPCScript Open the Actor class browser, expand Triggers>TriggeredCondition, and select TriggeredCondition 11/21/2018
18
Using if Conditions – 3 Tutorial 14.4
Place the TriggeredCondtion next to the Trigger and the ScriptedSequence Open the Property window for the TriggeredCondition, expand the category TriggeredCondition, and set value of bTriggerContolled to True Expand the events category and set the Tag property to IC_DoorControl 11/21/2018
19
Using if Conditions – 4 Tutorial 14.4
UseTrigger in front of the second PathNode send the event TestConsole Once the actions for the ScriptedTrigger are entered, rebuild the path, save, and test 11/21/2018
20
Actions for ScriptedTrigger Tutorial 14.4
Index Action Property Values Action_WAITFOREVENT ExternalEvent = TestConsole 1 Action_IFCONDITION TriggeredConditionTag = IC_DoorControl 2 Action_PLAYSOUND Sound = MenuSounds.J_MouseOver 3 Action_TRIGGEREVENT Event = OpenDoor 4 Action_ENDSECTION N/A 5 Action_GOTOACTION ActionNumber = 0 11/21/2018
21
Using Random Conditions - 1 Tutorial 14.5
Use map file Tutorial14_05_Start.ut2 Open the Actor class browser, expand Light, and select TriggerLight Place this TriggerLIght near the corner light Open the TriggerLight properties window, expand the LightColor category and set LightBrightness to 200 LightHue to 150 LightSaturation to 150 11/21/2018
22
Using Random Conditions - 2 Tutorial 14.5
Expand the Lighting category and set LightRadius to 10 Expand the Events category and set Tag to FlickerLight Expand the Object category and set InitialState to TriggerToggle Open the Actor class browser, expand KeyPoint>AIScript> and select ScriptedSequence 11/21/2018
23
Actions for ScriptedSequence Tutorial 14.5
Index Action Property Values Action_WAITFORTIMER PauseTime = 0.10 1 ACTION_IFRANDOMPCT Probability = 0.50 2 ACTION_TRIGGEREVENT Event = FlickerLight 3 ACTION_ENDSECTION N/A 4 ACTION_GOTOACTION ActionNumber = 0 11/21/2018
24
Using Random Conditions - 4 Tutorial 14.5
After entering the actions list in AIScript category, rebuild the level Save and test it (trigger lights have not always worked for me) 11/21/2018
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.