Thursday, April 23, 2015

ET 17 : Assignment 04: Unreal Tutorial

Timed Triggers Using the Matinee Method

This method is what I'm using in the Level Blueprint. We will set up a switch with a prompt to enable input, then set a wall to descend when the button is pushed.

Setup

The first thing to do is set up the switch so that your character is able to press a key to trigger an event. 

Place an instance of SM_Statue (Starter Content → Props) in your scene – this will be a visual representation of your switch, so put it wherever you want the switch to be. Then create a trigger volume in front of it, large enough for the character to stand in. Rename this volume (I named mine SliderTriggerVolume.) 


Right click on this trigger volume and select “OnEventBeginOverlap” from the Add Event option in the Collision submenu.

In the Level Blueprint, drag out from the OnActorBeginOverlap Other Actor node for the SliderTriggerVolume, and connect a Cast To MyCharacter node.


Then drag out from the Cast To MyCharacter pin and connect it to an Enable Input function. Drag a wire from the Player Controller pin and connect it to a Get Player Controller function. 

 
Next we’ll create a cue so that the player knows to press a button. So create a new String Variable, and name it Press F. Type “Press F” in the Default Value field. Compile now. 


Drag a wire from Enable Input and add a Print String function. Then create a reference to the Press F String Variable you just created (either click on it, right click and add reference, or just ctrl+drag it into the Event Graph. Connect the Press F string to the Print String function. Now when you enter the Trigger Volume, the player will receive a prompt to press F. 


Now we want to disable input when the character leaves the Trigger Volume, so that the F key can only trigger an event when the character is standing in it, and not at other random points.
Once again, right-click on the SliderTriggerVolume in the World Outliner, Add Event and this time select OnActorEndOverlap. 


In the Event Graph, once again, drag a wire from the blue “Other” pin to create a Cast To MyCharacter node. 


Then drag from the execution pin on Cast To MyCharacter and add a Disable Input function.


Finally, connect the Player Controller node on the Disable Input function to the Get Player Controller function (you can use the same one as before or make a new one, whichever you prefer). The final connection network should look like this. Draw a comment box around it and name it something useful, like Enable/Disable Input SliderTriggerVolume. 


Place an instance of wall_400x200 in the descending wall's starting position.



Add a new Matinee by selecting Add Matinee from the Matinee menu.


In the Matinee window, right click to Add New Empty Group, then - with the wall selected in the World Outliner - right click again to Add Selected Actors to Group. 


Right click again to Add New Movement Track. (No picture, but you know what you’re doing.)
Add a key at frame 0. For this tutorial, I have decided to give the wall a 10 second descent. So scroll in the movement track to 10 seconds (or however long you want this to take) and set another key. 

 Then in the main viewport, move the wall down to its final position.


If you are satisfied with the keys, close the matinee actor.

Select the Matinee Actor that you’ve just created in the World Outliner. Right click in the Event Graph to create a reference to the Matinee. 


Then drag a pin from the Matinee reference, and add a Play function. 


Then, from the execution pin on the left side of the Play function, drag a wire and connect it to F. This tells the game that when F is pressed, the Matinee should start to play. 


The final graph for the this part should look like this. 


Both graphs together look like this: 


Compile the graph and test it out.

If you want to add a delay before the start of the matinee, just insert a Delay function between the F event and the Play function, and specify how long to make the delay (here is one for 3 seconds). 


For this example, I have used the input event of pressing F to trigger the start of a matinee which closes a door. You can use this setup of input + delay to trigger any function you like, not just playing matinees.

Thursday, April 9, 2015

ET17 - Assignment 06 - Adding Basic Interactivity

I'm testing blueprints in a separate level map, but this pendulum setup is what I am going to use in a short maze in the basement leading to the dungeon  
 Interactivity practice -Here is an unlocked door, the pendulums, a rising platform and an automatic platform. I am working on a switch that will operate the wall at the end, so that it will descend.
Blueprint for the triggered platform
 Class blueprint for the pendulums
 Unlocked door class blueprint
 The beginnings of a class blueprint for the descending wall switch
 The beginnings of a class blueprint for the descending wall
I initially wanted to set up the switch and wall as two separate class blueprints so that they could be varying distances apart, but I'm still learning how to make blueprints talk to each other. This might just be better off in the level blueprint for now.

ET15 - Assignment 05 - Modeling a Modular Level

Whole Tower Wireframe Side View
Basement Level Tower has no windows
Main Floor Level Stair Tower has windows that connect with the upper level

Interlocked windows

All Tower Pieces stacked
Tower in Unreal Engine
Stairs in Maya

Stairs in Unreal

From Interior of tower stairwell
Observation balcony over chapel
Curved Chapel Floor
Chapel from above in Unreal Engine

Interior Wall with passthrough doors

Short exterior wall with windows
Long exterior wall with windows

Main Entrance to castle

Main Hall of castle - entrance

Exterior of windowed Walls in Unreal

Wall for dungeon bars in Maya

Wall and Dungeon Bars (separate meshes)

Dungeon bars in Unreal



Overview of Dugeon

Curved chapel wall with windows

Viewing balcony over chapel, curved walls
Main floor doorway to chapel

doorway to chapel in Unreal

One floor up from entry to chapel

Axe for dungeon booby trap

Axes in Unreal (still testing blueprints)