PDA

View Full Version : planet scripting question


newbiemodder
06-22-2009, 10:48 PM
I'm following stoffe's Adding planets to galaxy map for TSL..going fine..question: when editing the a_galaxymap.nss script, I want my planet to be available after a certain conversation takes place on Dantooine. What would my if-statement look like? Would I have to assign a global to the dialog and add it to globcat.2da? Scripting definitely not one of my strengths.

gsusfrk
06-25-2009, 12:36 PM
Here's an example:
void main()
{
if(GLOBAL_VARIABLE_X)//Checks if the global variable you set is true, in this case, we want it to be true when the conversation takes place. You'd need a script to change the global variable value
{
//use code here to change globcat.2da
}
}

Here's an outline of the script you would attach to a certain node in the conversation:

void main()
{
SetGlobalBoolean("GLOBAL_VARIABLE_X", TRUE);
}

In both cases, you would set "GLOBAL_VARIABLE_X" to the correct variable name (Sorry, I'm not good with global/local variables) I hope this helps!