Jump to content

Home

Cutscene Tutorial?


MacTavish

Recommended Posts

Is it possible to make your own cutscene? If it is, then is there a tutorial?

 

In-game cutscenes are essentially dialogs (DLG files) which have some sections without spoken lines and with different camera angles and with delays set between moving on to the next dialog node. Dialogs are good for flow control of even cutscenes with no spoken dialog since you can set how long the game should pause at each node, which camera should be used when at a node, what animations characters should play, setting journal entries etc, without the need for any scripts.

 

For things that must be scripted the conditional scripts for each dialog node allows for multiple paths along a cutscene (usually depending on choices the player has made in the game), and the action scripts to handle any scripted actions required for a particular part of the cutscene.

 

Thus dialog editing tutorials should give you some idea of how it works. These two are probably a good start:

 

General dialog editing

About cameras

 

It's harder to make tutorials of the scripting part of cutscene making since it depends on what you want to happen in a particular cutscene, though action scripts are often used for things like moving characters around, casting force powers, attacking etc. Have a look in the Scripting tutorials forum if there is anything about what you need to happen. If not, or if anything is unclear you can post more specific questions about that here in Holowan and I'm sure someone will have an answer for you. :)

Link to comment
Share on other sites

In-game cutscenes are essentially dialogs (DLG files) which have some sections without spoken lines and with different camera angles and with delays set between moving on to the next dialog node. Dialogs are good for flow control of even cutscenes with no spoken dialog since you can set how long the game should pause at each node, which camera should be used when at a node, what animations characters should play, setting journal entries without the need for any scripts.

 

For things that must be scripted the conditional scripts for each dialog node allows for multiple paths along a cutscene (usually depending on choices the player has made in the game), and the action scripts to handle any scripted actions required for a particular part of the cutscene.

 

Thus dialog editing tutorials should give you some idea of how it works. These two are probably a good start:

 

General dialog editing

About cameras

 

 

What I am trying to do is when my character walks to a certain place, a dialogue starts between two NPC's. Is there a script for that?

Link to comment
Share on other sites

What I am trying to do is when my character walks to a certain place, a dialogue starts between two NPC's. Is there a script for that?

 

If you want something to happen when the player walks in a particular location it's usually handled via triggers. A trigger is a "hot zone" you place within an area that fires a script whenever someone walks into it. There are a couple of tutorials for how to place triggers in this thread:

 

http://www.lucasforums.com/showthread.php?t=145870

 

As for the script fired by the trigger it could look something like this, as an example (green lines are comments describing what the next line does):

void main() {
   [color=PaleGreen]// ST: Check if it's the player entering the trigger, and that it hasn't already fired[/color]
   if (!GetLocalBoolean(OBJECT_SELF, 40) && (GetEnteringObject() == GetFirstPC())) {
       [color=PaleGreen]// ST: Get the two NPCs who should converse, set their tags below.[/color]
       object oNPC1 = GetObjectByTag("[color=Red]TagOfFirstNPC[/color]");
       object oNPC2 = GetObjectByTag("[color=Red]TagOfSecondNPC[/color]");

       [color=PaleGreen]// ST: Check if both NPCs who should converse are present in the area[/color]
       if (GetIsObjectValid(oNPC1) && GetIsObjectValid(oNPC2)) {
           [color=PaleGreen]// ST: Make sure the trigger only fires once.[/color]
           SetLocalBoolean(OBJECT_SELF, 40, TRUE);

           [color=PaleGreen]// ST: Start the dialog, change DialogFileName to the name of the DLG file.[/color]
           AssignCommand(oNPC1, ActionStartConversation(GetFirstPC(), "[color=Yellow]DialogFileName[/color]", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));
       }
   }
}

 

Set the parts in red above to the tags of the two NPCs who should talk (Tags are set in their UTC files). Change DialogFileName in the script to the name of your DLG file (without the .dlg suffix).

 

This will make the first NPC start a conversation the first time the player trips the trigger. The conversation is technically started with the player, you'll set in the DLG file itself so that they will appear to talk to each other.

 

In the dialog file you only use the Entry nodes for a conversation between two NPCs. Leave the Reply nodes blank to put them in (Continue) mode to link together the Entries. Then you set the tag of who is supposed to talk in the Speaker field of each Entry node, and the tag of the one they are talking to (who they will face) in the Listener field. Alternate the Speaker and Listener field to make the two NPCs talk back and forth.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...