Jump to content

Home

How to pass parameters to a script from a dialog ??


Pontifice

Recommended Posts

No.

 

I want to know if it is possible to pass a value to a script from the dialog.

 

I am searching a way to use less scripts in a complex dialog, i want to know from where ( the path i choose in the dialog ) i called the script.

 

An example:

int main(int parameter){

switch(parameter){
case '1':
   ( something )    
 break;
 case '2':
   ( something  2)    
 break;
 default:
   ( something 3)    

} 

}

 

 

I suppouse i could use Local parameters but i don't know

Link to comment
Share on other sites

You can't pass parameters directly, but you can use the Set/GetLocalNumber functions to accomplish the same thing.

 

To go the other way, there is a function called something like SetCustomToken that allows you to set a dialog token string from a script.

Link to comment
Share on other sites

It seems that dialogs in kotor2 can pass parameters.

 

There are dialog entries called ActionParamX ( X is a number ) ActionParamXb and ActionParamStrA/B.

 

And in nwnscript.nss:

 

// DJS-OEI

// 768. GetScriptParameter

// This function will take the index of a script parameter

// and return the value associated with it. The index

// of the first parameter is 1.

int GetScriptParameter( int nIndex );

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...