1 / 42

Unreal Interactive Elements

Unreal Interactive Elements. CIS 488/588 Bruce R. Maxim UM-Dearborn. Adding a Movable Door - 1 Tutorial 9.1. Begin with the map file Tutorial9_01_Start.ut2 We added a mover to the 3D view ourselves

Download Presentation

Unreal Interactive Elements

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Unreal Interactive Elements CIS 488/588 Bruce R. Maxim UM-Dearborn

  2. Adding a Movable Door - 1Tutorial 9.1 • Begin with the map file Tutorial9_01_Start.ut2 • We added a mover to the 3D view ourselves • Open the Static Mesh browser, open the XceptOneObjA.usx, and select Flux2DoorH in the Doors group • Move the mouse cursor the 3D view and click the add Mover icon from the left tool bar • You’ll need to find it and move it into place in the control room

  3. Adding a Movable Door - 2Tutorial 9.1 • To make the door fit the doorway you need to adjust the 3D scale values (0.9,0.45,1.85) • The will also need to darker the texture of the door by adjust the Mover display properties • Use the RMB to open the properties window and change the UV2Texture property in the Display category to ‘XceptTwo.Flux2Stuff.FluxDoorB12”

  4. Animating Door - 1Tutorial 9.2 • The base state for the door Key 0 is set for you when you place the door in the level • For this door Key 0 is closed, we need to define its open state • The the RMB an click on the door to open the context menu • Choose the Mover option and select Key 1 on the sub menu that appears

  5. Animating Door - 2Tutorial 9.2 • Now move the door to the open position using the mouse • Use the RMB to click on the door and this time choose the Mover selection and select the Key 0 item to make sure that the door closes • Good idea to save your work right now

  6. Controlling Door - 1Tutorial 9.3 • Use the RMB to access the Mover’s properties window • Open the Object category and click the InitialState property to open pull down menu • Select BumpOpenedTimed from the menu • Open the Mover category and set the value of the Numkeys property to 2 (Key 0 and Key 1) • Set the value of the StayOpenTime to 2 seconds

  7. Controlling Door - 2Tutorial 9.3 • Set the value of the delay property to 0 (which means door opens as soon as its bumped) • Set the value of KeyNum to 0 (the starting position for the Mover) • Rebuild the level, save the map, and test it (door should open when bumped by player)

  8. Creating Message Trigger – 1Tutorial 9.4 • Open the Actor Class browser • Expand Triggers and select MessageTrigger • Use RMB to add the MessageTrigger some where near the door • Open the MessageTrigger properties window and expand the MessageTrigger category • Set the value of the Message property to Control Room Door has Been Opened

  9. Creating Message Trigger – 2Tutorial 9.4 • Make sure the MessageType property is set to EMT_CriticialEvent (ensures message is displayed as an in-game notification) • Expand the Events category an set the Tag property value to DoorOpened (which means listen for the DoorOpened message) • Use the RMB to open the Mover’s properties window, open the MoverEvents category and set value of OpenedEvent to DoorOpened

  10. Building the Elevator – 1Tutorial 9.5 • Open the Tutorial9_05_start.ut2 file • Open the Static Mesh browser, open the package newhanger2.usx, and select the elevatorFrame from the Pakage0 group • Use the RMB to place the frame in the hanger across indentation in the wall (make sure it touches the floor) • You may need to use the rotate actor button from the left-hand toolbar to position frame

  11. Building the Elevator – 2Tutorial 9.5 • You can add railings along the top of the frame if you wish • Select the elevatorLift from the Elevator group in the Static mesh browser (also in the newHanger2.usx package) • Make sure the builder brush is near the bottom of the elevator and use the add Mover button from the left-hand tool • Rotate the elevator so that the panel is near the left side of the frame

  12. Building the Elevator – 3Tutorial 9.5 • Place some lights in and around the elevator • Use the RMB to click on the elevator platform and open the context menu • Select the Mover item to select the Key 1 item and position the platform at the top of the elevator frame • Use Key 0 to reposition the platform at the bottom rebuild and save the level

  13. Implementing Use Trigger – 1Tutorial 9.6 • We need to place one Use Trigger at the bottom of the elevator and one Use Trigger at the top of the elevator • Use triggers are activated when the player is close to it and presses the use key E • Open the Actor Class browser, expand the Triggers category and select UseTrigger • Use the RMB to place a UseTrigger in front of the platform control panel near the floor

  14. Implementing Use Trigger – 2Tutorial 9.6 • Use the RMB to open the UseTrigger properties window • Expand the Events category and set the value of the Event property to frontLift (the broadcast message) • Use the RMB open the Mover (platform) properties window • Expand the Events category and set the value of the Tag property to frontLift (listener)

  15. Implementing Use Trigger – 3Tutorial 9.6 • Expand the Object category and set the InitialState property value to TriggerToggle • Expand the Mover category and set the MoveTime property value to 5 seconds • Use the RMB to open the context menu and use the Mover item to access Key 1 and move the elevator top of the shaft • Select the UseTrigger near the floor and use Ctrl-W to duplicate it

  16. Implementing Use Trigger – 4Tutorial 9.6 • Move the copy of the UseTrigger to the top of the elevator shaft so that it is in front of the platform panel • Rebuild the level, save it, and test the elevator

  17. Scripted Trigger – 1Tutorial 9.7 • A more realistic elevator control system could be created using scripted triggers • Open the Actor Class browser, expand Actor>Keypoint>AIScript>ScriptedSequence and select ScriptedTrigger • Use the RMB to add the ScriptedTrigger some where in the level (near the elevator would make it easier to keep track of)

  18. Scripted Trigger – 2Tutorial 9.7 • Use the RMB to open the properties window of ScriptedTrigger • Expand the AIScript category and click on the Actions category and click the Add button to insert a slot to define a new Action • Click on the New property to open a drop down list, select Action_WAIT-FOREVENT, and click the New button to open up the properties for this event

  19. Scripted Trigger – 3Tutorial 9.7 • Set the value of the ExternalEvent property to frontLift (makes trigger listen for broadcast) • Add a new Action[1], define its action as Action_TRIGGEREVENT, and set its Event property to frontLiftMover • Add a new Action[2], define its action as Action_GOTOACTION, and set its ActionNumber property to 0 (creates loop)

  20. Action List for Scripted Trigger

  21. Scripted Trigger – 4Tutorial 9.7 • Use the RMB to open the properties window of the elevator platform Mover actor • Open the Events category and change the value of the Event property to frontLiftMover (which causes it to cease listening to the UseTrigger and start listening to the ScriptedTrigger) • Rebuild, save, and test the level

  22. Jump Pads – 1Tutorial 9.14 • Add an alcove near the top of the hanger • Create a 256x256x256 cube and subtract it from the wall • Adjust its position using the perspective views and add a light to it • Move the PlayerStart icon to the alcove and rotate it to point out into the room • To create the jump pad begin by opening the Actor Class browser

  23. Jump Pads – 2Tutorial 9.14 • Expand Actor>NavigationPoint>JumpPad and select the UTJumpPad actor • Use the RMB to add the UTJumpPad to the floor of the alcove • Expand Actor>NavigationPoint>JumpDest and select the JumpSpot actor • Use the RMB to add the JumpSpot on the floor by the elevator

  24. Jump Pads – 3Tutorial 9.14 • Use the RMB to open the JumpSpot properties window • Expand the Object category and check the value for the Name property (should be something like JumpSpot0) • Use the RMB to open the UTJumPad to open the properties window • Expand the NavigationPoint category

  25. Jump Pads – 4Tutorial 9.14 • Expand the ForcedPaths property and set the value of [0] to JumpSpot0 • Expand the Advanced category and set the value of bHidden to False • The last step is to click on the Buildpaths icon on the top toolbar • Rebuild, save, and test the level

  26. Teleporters – 1Tutorial 9.15 • Open the Actor Class browser and expand Actor>NavigationPoint>SmallNavigationPoint then select Teleporter • Use the RMB to add a teleporter to the alcove and then add a teleporter to the control room • Use the RMB to open the control room teleporter properties window • Expand the Events category and set the Tag property to ControlRoom (its name)

  27. Teleporters – 2Tutorial 9.15 • Expand the Teleporter category and set the URL property to TopTeleporter (destination) • Use the RMB to open the properties window of the teleporter in the alcove • Expand the Events category and set the Tag property to ControlRoom (its name) • Expand the Teleporter category and set the URL property to ControlRoom (destination)

  28. Teleporters – 3Tutorial 9.15 • Open the Advanced category in the properties window in each Teleporter • Expand the the Advanced category and set the value of the bHidden property to False • Rebuild the level, save, and test it • Note: it is possible to have multiple destinations by setting the Tag and URL in each of several Teleporters to the value Random

  29. Door Control – 1Tutorial 9.9 • We can have the elevator motion opening of a door at the top of the shaft • Duplicate the control room door and move the copy to the top if the elevator shaft. • Make sure Key 0 and Key 1 are working properly on the new door. • Use the RMB to open the door properties window, expand the Object category, and set the InitialState value to TriggerToggle

  30. Door Control – 2Tutorial 9.9 • Expand the Events category and set the Tag property value to the liftDoor • Use the RMB to open the elevator platform properties window • Expand the MoverEvents category and set the values of both the ClosingEvent and OpeningEvent properties to liftDoor (causes the elevator to open the door at the top and then start back down)

  31. Door ControlTutorial 9.10 • We can create an operational control panel in the level • Open the Static Mesh browser, expand the Elevator group, and then select the mesh elevatorControl • Use the RMB to place the control panel on the wall near the left side of the elevator door • Duplicate one of the UseTriggers already in the level and place it in front of the panel • Save you work

  32. Material Trigger – 1Tutorial 9.11 • It would be nice if the panel button changed from red to green when the elevator moved • Open the Actor Class browser and expand Actor>Triggers then select MaterialTrigger • Use the RMB to place the trigger some where in the level (like near the elevator base again) • Open the Texture browser, open the package Chapter9.utx, and select MatTrigger group

  33. Material Trigger – 2Tutorial 9.11 • Choose File>New from the Texture browser dialog box and change package entry to Chapter9 (the save location) • Set Group to MatTrigger, change the Name entry to StartStop, and change the entry for MaterialClass to MaterialSwitch • Click New and open a new window • Select the Materials category and press the Add button twice

  34. Material Trigger – 3Tutorial 9.11 • Select the Red texture in the materials browser and return to the MaterialsSwitch properties window • Select materials entry[0] and press the Use button • Repeat the process to get the Green texture in materials entry[1] • Rebuild and save the level

  35. Material Trigger Control – 1Tutorial 9.12 • Use the RMB to open the properties window for the MaterialTrigger • Expand the MaterialTrigger category and click MaterialsToTrigger • Click the Add button • Select StartStop material in Material Editor • Return to the MaterialTrigger properties, click entry[0] and then the Use button

  36. Material Trigger Control – 2Tutorial 9.12 • Expand the Events category and set the Tag property value to onOffTrigger • Use the RMB to open the ScriptedTrigger properties window • Expand the AIScript and Actions list, select Action[1] and use New to insert an new action (pushing Action[1] to Action[2]) • Make new Action[1] entry Action_TriggerEvent and set the Event property to onOffTrigger

  37. Material Trigger Control – 3Tutorial 9.12 • Use RMB to open the elevator Mover’s property window • Open the MoverEvents category and set the ClosedEvent property to ClosedEvent • Use the RMB to open the door Mover’s propety window • Expand the MoverEvents category set the OpeningEvent property to onOffTrigger

  38. Material Trigger Control – 4Tutorial 9.12 • Open the Texture browser and select the StartStop material in the Chapter9 package MatTrigger group • Open the Static Mesh browser and select the elevatorControl in the NewHanger2 package Package0 group • Expand the Materials category, select Material[1] and click the Use button • Rebuild, save, and test the map

  39. Material Trigger Control – 5Tutorial 9.12 • Open the ScriptedTrigger properties, expand the AIScript, select Action[1] WAITFORTIMER and insert a new Action_TRIGGEREVENT • Enter onOffEvent as the Event value for the new Action[1] • Open the lift Mover’s properties, expand the MoverEvents tab, and set the ClosedEvent to onOffTrigger

  40. Material Trigger Control – 6Tutorial 9.12 • Open the properties elevator door Mover and expand the MoverEvents tab • Set the OpeningEvent property value to onOffTrigger • Open the Texture browser and select the StartStop material • Locate the elevator Control mesh select Material[1], and click the use button

  41. Material Trigger Control – 7Tutorial 9.12 • Locate the elevator Lift mesh, select Material[2], and click the Use button • Save and test your work • Tutorial 9.13 adds a progress bar to the elevator animation • Tutorial 9.8 adds a shaker view Trigger • The complete AIScript for the ScriptedTrigger appears on the next slide

  42. Action List for Scripted Trigger

More Related