Jump to content

Home

Is this possible?


Recommended Posts

Maybe you should give this script a try, Jeb:

 

//:: k_swg_bastila29
/*
   Simple fade to black. . .
*/
//:: Created By:
//:: Copyright (c) 2002 Bioware Corp.

#include "k_inc_debug"
void main()
{
   ActionPauseConversation();
   SetGlobalFadeIn(0.0, 1.5);
   ActionWait(1.5);
   ActionResumeConversation();
}

 

It is the fade to black sequence for the Bastila Romance scene on the Ebon Hawk. How you attach a script to a trigger you already know, I guess.

Link to comment
Share on other sites

When the PC and party members get to a certain location, the screen fades to black twice (so it fades to black, then you see the screen again, then fades again) and then a dialog starts?

 

The easiest way of doing this is probably to create a trigger at the location where you want the fade and conversation start to happen. Then use an OnEnter event script set on the trigger to do the fading and start the dialog.

 

Something like:

void main() {
   [color=PaleGreen]// ST: The player controlled character is tripping the trigger[/color]
   if (!GetLocalBoolean(OBJECT_SELF, 40) && (GetEnteringObject() == GetPartyMemberByIndex(0))) {
       [color=PaleGreen]// ST: prevent it from happening more than once.[/color]
       SetLocalBoolean(OBJECT_SELF, 40, TRUE);

       [color=PaleGreen]// ST: Fade to black for 2 seconds, then fade back in[/color]
       SetGlobalFadeOut(0.0, 2.0);
       SetGlobalFadeIn(2.0, 2.0);

       [color=PaleGreen]// ST: Fade to black again for 2 seconds[/color]
       SetGlobalFadeOut(4.0, 2.0);
       SetGlobalFadeIn(6.0, 0.0);  

       [color=PaleGreen]// ST: Start conversation at the end of the second fade[/color]
       object oNPC = GetObjectByTag("[color=Yellow]TagOfNpc[/color]");
       DelayCommand(6.0, AssignCommand(oNPC, ClearAllActions()));
       DelayCommand(6.0, AssignCommand(oNPC, ActionStartConversation(GetFirstPC(), "[color=Orange]DialogFile[/color]", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
   }
}

 

Where you change TagOfNpc to the tag of the NPC to start the dialog with, and DialogFile to the name of the DLG file containing the conversation.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...