lfnetwork.com mark read register faq members calendar

Thread: [TSL] Writing a cutscene
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 06-25-2007, 11:03 AM   #1
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
[TSL] Writing a cutscene

Im pretty useless at scripting and need help (as per usual)

I basically want this to happen:
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.

Scripts are for TSL if anyone can help. Thanks
~GM


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster is offline   you may: quote & reply,
Old 06-25-2007, 11:48 AM   #2
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
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.

stoffe is offline   you may: quote & reply,
Old 06-25-2007, 11:55 AM   #3
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Dragon Age: Origins
Forum Veteran Helpful! Notable contributor 
And if you want the cutscene to be completely devoid of player interaction, use only Entry Nodes for dialog and leave the Reply Nodes blank.
tk102 is offline   you may: quote & reply,
Old 06-25-2007, 12:24 PM   #4
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
Saved!

Thanks very much I'll test this out and post back my results.


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster is offline   you may: quote & reply,
Old 06-25-2007, 12:47 PM   #5
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
I just tryed to compile the scripts you gave me and the cutscene.nss script gets this:
Code:
Lookup path root set to: C:\Program Files\LucasArts\SWKotOR\
Loaded nwscript.nss from C:\Program Files\LucasArts\SWKotOR\override/
Compiling: gmh005.nss
gmh005.nss(5): Error: Undeclared identifier "GetScriptParameter"
Compilation aborted with errors
Total Execution time = 15 ms
Can someone explain whats wrong please?
Thanks ~GM


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster is offline   you may: quote & reply,
Old 06-25-2007, 12:52 PM   #6
Pavlos
Scruffy Englishman
 
Pavlos's Avatar
 
Join Date: Sep 2005
Location: The real world/ivory towers
Posts: 1,974
Current Game: Viking Warrior Poets
You're compiling with a KotOR version of NWScript - GetScriptParameter doesn't exist in the first game . Set the compiler to TSL and you should be fine .
Pavlos is offline   you may: quote & reply,
Old 06-25-2007, 12:54 PM   #7
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
Ah, indeed i am.. Thanks

~gm


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > [TSL] Writing a cutscene

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:03 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.