Quote:
|
Originally Posted by glovemaster
Enter module, dialog starts, end of that dialog a movie is played, end of that movie (same module as before) second dialog starts, end of that dialog it fades out and a new module starts.
I have some ideas as to the scripts needed, i will need a script to fire the dialog when i enter the module, a script to fire the movie and start the second dialog afterwards, and a script to fade out and start a new module.
|
You could do the cutscene part with a single dialog that contains both conversation branches, and one action script. The dialog would be laid out something like:
mycutscene.dlg:
Code:
E1: This is the first dialog. Blah blah blah....
R1: Oh really?
E2: Blah blah blah blah....
R2: You don't say?
E3: Blah blah blah...
R3: Not listening, let's see a movie instead [script: mycutscene, P1: 1]
E4: The second dialog! Blah blah...
R4: Oh joy...
E5: Blah blah blah
R5: Enough of this! I'm leaving! [script: mycutscene, P1: 2]
The "mycutscene" action script called from R3 and R5 could look something like:
mycutscene.nss:
Code:
void main() {
int iAction = GetScriptParameter(1);
// Play the movie...
if (iAction == 1) {
PlayMovie("moviename");
}
// Fade to black and load new module
else if (iAction == 2) {
SetGlobalFadeOut(0.0, 0.5);
StartNewModule("modulename", "waypointtag");
}
}
Replace
moviename with the name of the Bink movie file (without the .BIK extension) and
modulename with the name of the module file to load.
The Area OnEnter script to start the cutscene dialog when the player enters the area could look something like:
Code:
void main() {
if ((GetEnteringObject() == GetFirstPC()) && !GetLocalBoolean(OBJECT_SELF, 40)) {
object oTalker = GetObjectByTag("TagOfNPC");
SetLocalBoolean(OBJECT_SELF, 40, TRUE);
AssignCommand(oTalker, ActionStartConversation(GetFirstPC(), "mycutscene", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));
}
}
Change
TagOfNPC to the tag of the primary NPC the player speaks with in the dialog, or change it to
GetFirstPC() if the player is the lone actor in the cutscene.