Jump to content

Home

Script that checks availability for dialogue


Seamhainn

Recommended Posts

Hello!

 

I copied this more or less from the Script, Source to check for availabilty for a dialogue line. Unfortunately it does not work. What is wrong here?

 

int StartingConditional() {
int iResult;
iResult = (GetGlobalNumber("DAN_JEDI_PLOT") == 7);
return iResult;
}

 

Thanks for any help!

Link to comment
Share on other sites

Hello!

 

I copied this more or less from the Script, Source to check for availabilty for a dialogue line. Unfortunately it does not work. What is wrong here?

 

int StartingConditional() {
int iResult;
iResult = (GetGlobalNumber("DAN_JEDI_PLOT") == 7);
return iResult;
}

 

Thanks for any help!

 

Test if this script works.

 


int StartingConditional() {
 int nResumeTalk=GetGlobalNumber("DAN_JEDI_PLOT");
 return nResumeTalk == 7;
}

Link to comment
Share on other sites

No, that will not work. Tar'eelok has - umong other lines - a line if the PC saved Juhani (and another if the PC killed Juhani). Both end the dialogue.

 

The script that checks for the availabilities are:

 

int StartingConditional() {
int iResult;
iResult = (GetGlobalNumber("DAN_JUHANI_PLOT") == 2);
return iResult;
}

 

and

 

int StartingConditional() {
int iResult;
iResult = (GetGlobalNumber("DAN_JUHANI_PLOT") == 3);
return iResult;
}

 

Both work perfectly well, but both also end the dialogue and make the other dialogue nodes which follow unavailable. So I want that the check also secures that the dialogue line in question only is said once and with another conversation initiated the following dialogue nodes are available.

 

EDIT: I know that is normally handled with a GlobalBoolean, but I don't know how that is scripted...

 

EDIT2: I just found a Boolean called DAN_TAREEJ_DONE which the developers created for that specific purpuse. Is there a possibility if the Boolean is used anywhere else in the game?

Link to comment
Share on other sites

This is the script that the game uses on beyala dialog

 

 
//:: k_pdan_juhani01
/*
   Checks to see if DAN_BELAYAJ_DONE is FALSE (meaning
   she has not mentioned Juhani before) and that
   DAN_JUHANI_PLOT is 3 (meaning that Juhani has been
   saved). This conversation will not repeat as
   DAN_BELAYAJ_DONE is set to TRUE.
*/
//:: Created By: Peter T
//:: Copyright (c) 2002 Bioware Corp.
#include "k_inc_debug"

int StartingConditional()
{
   int iResult;

   iResult = ((GetGlobalBoolean("DAN_BELAYAJ_DONE") == FALSE) && (GetGlobalNumber("DAN_JUHANI_PLOT") == 3));
   if (iResult)
       SetGlobalBoolean("DAN_BELAYAJ_DONE", TRUE);

   return iResult;
}

 

 

So there is two options we have. We use a old Boolean from taris althought i don't now how to reset Boolean as the Booleans from taris may already have been set the true :( or we make a new Boolean this could althought conflict with other mods.

 

However the script would look like these:

 

#include "k_inc_debug"

int StartingConditional()
{
   int iResult;

   iResult = ((GetGlobalBoolean("tag_of_boolean") == FALSE) && (GetGlobalNumber("DAN_JUHANI_PLOT") == 3));
   if (iResult)
       SetGlobalBoolean("tag_of_boolean", TRUE);

   return iResult;
}

 

If player saved Jhuani

 

 

#include "k_inc_debug"

int StartingConditional()
{
   int iResult;

   iResult = ((GetGlobalBoolean("tag_of_boolean") == FALSE) && (GetGlobalNumber("DAN_JUHANI_PLOT") == 2));
   if (iResult)
       SetGlobalBoolean("tag_of_boolean", TRUE);

   return iResult;
}

 

If player killed jhuani

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...