Someone knows how to pass parameters to a script from a dialog ???
Thank you
What do you mean by paramaters? Such as if the script returns true to have it say so?
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
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.
Thanks to both of you.
Very useful information :D ( the token thing was my next question )
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 );