Jump to content

Home

Dialogue question [TSL]


ace92

Recommended Posts

Attach the following script as the conditional script, change GLOBAL to the name of the global you want to track, 0 to whatever state it needs to be at and 711KOR to whatever module the player has to be in.

 

int StartingConditional() {
   if ( ( GetModuleName() == "711KOR") && (GetGlobalBoolean("GLOBAL")==0)) {
	return 1;
}
return 0;
}

Don't forget that if you're using globals you'll have to add them to globalcat.2da or the game won't be able to track them.

 

--Stream

Link to comment
Share on other sites

I hope it'll be clear...

You need open globalcat.2da in KotOR Tool 2da editor. Go to BIFs\2da.bif\2da array\find and open globalcat.2da. Now scroll down of file. In "(Row label)" column add some number, in column name write any name for your global (next you'll need put name in script), and a type must be "Number" or "Boolean". In this script it's Global Boolean. Now you can save globalcat.2da in your override folder.

Link to comment
Share on other sites

He means that you need to change it to return either TRUE or FALSE.

There was an error in the script however, where GetGlobalBoolean was being compared with TRUE or FALSE.

 

This should work:

int StartingConditional() {
   return (GetModuleName() == [color=cyan]"module_resref"[/color] &&
           GetGlobalBoolean([color=cyan]"global_boolean_identifier"[/color]))
}

Link to comment
Share on other sites

Well, actually now I think about it you don't really need to have a check on the module unless you intend to have the dialogue called from different modules.

And global_boolean_identifier is the identifier for your new line in globalcat.2da

int StartingConditional() {
   return (GetGlobalBoolean([color=cyan]"global_boolean_identifier"[/color]));
}

That script will probably be just as effective.

Link to comment
Share on other sites

Sort of, but for that to occur a script must be fired when the Player selected the node that will set the GlobalBoolean to true.

void main()
{
   SetGlobalBoolean([color=cyan]"global_boolean_identifier"[/color], TRUE);
}

 

And so in globalcat.2da you will add a new line like so:

RowLabel	name		type
----------------------------------------
(High)		555_spokento	Boolean

 

Therefore, global_boolean_identifier will become 555_spokento

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...