This tutorial is for creating a basic "scripted" cutscene which should give an idea of how to set one up for the first time.
This is a simple cutscene involving one character (Patrick), which teleports the player and destroys the generated character at the end of the cutscene.
Actors required
- Cutscene trigger
- Master camera point
- Nav camera points (minimum of 2)
- Creature generator
- Narrator script/s
- Alarm point/s
- Destroy trigger
Setting up the actors
Cutscene Trigger
This is what starts the cutscene and can be triggered by player proximity, after an event or even at the start of the level. The event name is set to the tag of the MasterCameraPoint eg cam. This gets the cameras rolling.
Master Camera Point (MCP)
This is the main camera with many settings to define. Set the tag of the MCP to the event name of the cutscene trigger, (eg cam). Set the Event to the same name as the tag of the next nav camera in the chain, eg cam1.
Open Camera Navigation properties and set the following :
- Event 1 to the tag of the creature generator (eg cgpat). This ensures that the creature generated, eg Patrick will be triggered at the start of the cutscene by the camera. Event 2 can be used to trigger some music.
- The LookAt property defines where/who the camera will focus on, in this case Patrick so we can set this to the StartActorTag of the creature generator (this tag is called Patrick in this example).
- Open Master Camera Point properties and set up the following: bAnimatedCamera false (this set to true would create another type of cutscene where the master camera is the only camera and is mobile). bAutoClearAims true, bEndGame false, bEscapable false, bFromPlayersEyes false, bHidePlayer true (unless you are creating a cutscene where the player is in view, eg travelling on an elevator and does not need to actually do anything scripted), bHoldPlayer true, bLetterboxed true, bTeleportPlayer true (this will teleport the player to the same place where the generated Patrick ends up. It is not needed if he will end up where he started from).
- Set cutscene length - this may not be known yet so pick an arbitrary length eg 10. Camera distances from one another and speed modifiers affect the length of the scene so you may need to experiment a bit.
- Set the EndEvent to the Destroy Trigger’s tag (eg endpat). This ensures that the generated Patrick is destroyed at exactly the same moment as the cutscene ends - no need to play around with timings.
- Set TeleportTag to the same name as the final Alarm Point tag where Patrick ends up (eg here1). This only applies if Patrick is moving around, so say he walks from point A to point B, when the cutscene ends the player will be teleported to point B.
Nav Cameras
As far as I can tell by experimentation a minimum of 2 nav cameras are required for a scene to work. You can set them up where you want - in a straight line, in a circle, high above the player etc. Set the tag of the first nav camera to the event name of the Master Camera Point, (eg cam1), and the event to a new name, eg cam2. Set LookAt to Patrick. Do the same with the second nav camera, but set the tag to the event name of the first nav camera (eg cam2), set event to none, set bEndCutScene to true (this is always set to true on the last camera of a chain in a cutscene). Set LookAt to Patrick. Now we have one master camera, two nav cameras, all in a chain and all looking at Patrick.
Generating Patrick
To generate Patrick, a master creature generator is used. This allows him to materialize when the scene starts.
Place the creature generator and set its tag to any name (eg cgpat), and StartActorTag to another name (eg Patrick). Set StartState to AIRunScript (this tells it that a narrator script will be used as soon as it is generated), and StartTag to the tag of the narrator script being used (eg nspat). Set up the other values for the creature generator, eg max alive (1), max generated (1).
Destroy Trigger
This ensures that the generated Patrick will disappear at the same instance the cutscene ends. Set its tag to the EndEvent name you gave in the Master Camera (eg endpat). Open Destroy Trigger properties and set the first event to Patrick (this defines what actor will be destroyed). Open up Trigger and set bpassthro to true (this is because it will not be activated by player proximity).
Narrator Script
This is the part that directs the cutscene - you can trigger events, play animations, get characters to walk to a certain point etc. There is so much that can be done.
Set its tag to the same name you gave the generated Patrick’s StartTag, (eg nspat). Open up NarratorScript and you’ll see an action list. It is here that you can get the character/s to do things, or trigger other things eg music, effects etc.
Place an alarm point on the floor, and get Patrick to walk to that point (use WalktoPoint and give the action name the same name as the tag of the Alarm Point). Place another and do the same, but set Patrick to wait before walking to the second alarm point). Set the tag of the last alarm point to the same name as the TeleportTag in the Master Camera, eg here1.
Do not place the alarm points too far away from each other, or out of each subsequent point’s line of sight, otherwise Patrick will just stand there!
Summary
That’s it. This should create a basic cutscene. For more complex scenes the ideas are the same, just add more characters, scripts, sounds, effects, and experiment with camera settings eg hold, cut to next point, speed modifiers, LookAt targets etc. If you are using a lot of characters which interact during the cutscene at different times, I found the most reliable way to trigger them is via other pawns’ narrator scripts as this preserves the interaction timings if you change the cutscene length or speed modifiers etc. "Non scripted" cutscenes can use the cameras to trigger events.
***
|