Prerequisites:
Setting up your own packages
Intro to ConEdit: Creating basic
conversations
Overview:
This tutorial will cover how to create real-time "cut scenes" (cinematics)
like the ones in Deus Ex for the intro and end games. The key is to use
CameraPoint objects to define the camera movement. If you're going
to use a conversation during the cut scene, you will need to use a custom package
(since a mission script will be required) as well as be familiar with ConEdit,
so please go to the above links if you need to.
Download example map, conversation, and script files (13K)
The first step is to create a new map. As you might guess, you'll have to set up all of the brushes, NPC's, decoration, and lighting in the map to act as the "sets" for your little movie. In the Deus Ex intro, they set up several different areas that acted like individual sets. When you define the movement of the camera, you'll be able to "cut" directly to a different location.
You'll likely want to include a conversation that plays during your movie. You can have the characters that are talking be visible to the camera some of the time, but that's not a requirement. A conversation is not required, though. If you don't need a conversation, you can skip this step as well as Step 4.
Choose one of the characters in your map to be the owner. Create a new .con file in ConEdit, and create a single conversation with that character as the owner. You don't need to do anything fancy here, just add normal Speech events.
Be sure to check the "Non-interactive Conversation" property of your conversation.
Now the fun part. Here's where you will define the motion and position of the camera. You can really go nuts with this part, but for now let's keep it simple.
The camera will actually start at the PlayerStart, so add a PlayerStart if you haven't already. Position and rotate it to where you'd like the camera to start. It's OK to start it high in the air or whatever - there won't be any player interaction, so the player can't be killed.
Now you can define the rest of the camera's path. In UnrealEd, under Actor -> Keypoint, select CameraPoint. Add one to your map where you'd like the camera to go next. They look like this: in the editor. To get a rough idea what the camera will end up seeing, use the 3D view in UnrealEd. Then you can line up the eyeball icon of the camera in the editor with the CameraPoint eyeball icon.
Pull up the CameraPoint's properties. For your first camera position, you probably won't need to change anything. Go ahead an add another CameraPoint where you'd like the camera to go next, and pull up *its* properties and expand the CameraPoint category. You'll need to set the sequenceNum to 1. (your first CameraPoint should have a sequenceNum of 0) You'll need to bump up that number for each new CameraPoint you add.
Another important thing to set is the timeSmooth value. For a camera move, that determines how long it will take the camera to move to that point. To instantly "cut" to a new location, set the timeSmooth value to zero.
Most of the time you will leave the Cmd value set to CAMCMD_MOVE (a camera move). But you can also do a number of other things such as pans, tilts, rolls, etc. Most of these other commands work along with the Value property. For examples of some crazy stuff you can do, check out the 99_Endgame4.dx map. That's the "dance party" cut scene. For other examples of using CameraPoint's, check out the 00_Intro.dx map and the other "99_Endgame" maps.
One interesting CameraPoint command is CAMCMD_TRIGGER. You can use that command along with the eventName property. You can set the eventName to the name of something you want to trigger. That way you can synchronize "scripted events" to correspond to where the camera is. In my example map, I fired off an OrdersTrigger and an AllianceTrigger using that.
Add all of your CameraPoint's or just a few to get started. You can always add more later.
In order to have a conversation running during your cut scene, as well as firing off your conversation initially, you'll need to associate a mission script with your map. Don't worry, you won't have to write any code, just change a few things in a script.
Create a file called MyIntroMission.uc (or whatever you want) in your package's Classes folder based on the TutorialMissionIntro.uc that's included with my example map. You'll need to change wherever it says "TutorialMissionIntro" to whatever you are calling your mission script.
You'll also need to change the references to MaggieChow to whatever character is the converstion owner in your map. You can also change the references to "maggie" to something else, but that's not important (as long as it's consistent).
NOTE: If you've never created a mission script before, it may be helpful to do the How to make the opening text to show up tutorial first.
Exit UnrealEd if necessary and build your package using "ucc make".
Fire UnrealEd back up and pull up your map. Be sure to add a DeusExLevelInfo to your map. Pull up its properties, expand DeusExLevelInfo, and set the Script value to your mission script.
Remember to set the ConversationPackage value to the name of your package.
Your map should now work as a cut scene. If you have any problems, please look at my example map.
If you're creating an intro cut scene, you'll most likely want to have your first playable map loaded as soon as the intro ends.
One way to do that is to trigger a MapExit item with your final CameraPoint using the CAMCMD_TRIGGER camera command. (thanks for the suggestion Damocles!)
If you happen to be using a custom player class, there's an alternative. In the default properties of your custom player class, you can instead set bStartNewGameAfterIntro to True, and strStartMap to the name of your map (without the .dx extension).