Pontifice Posted February 2, 2005 Share Posted February 2, 2005 Someone knows how to pass parameters to a script from a dialog ??? Thank you Link to comment Share on other sites More sharing options...
Darkkender Posted February 2, 2005 Share Posted February 2, 2005 What do you mean by paramaters? Such as if the script returns true to have it say so? Link to comment Share on other sites More sharing options...
Pontifice Posted February 2, 2005 Author Share Posted February 2, 2005 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 More sharing options...
tk102 Posted February 2, 2005 Share Posted February 2, 2005 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 More sharing options...
Pontifice Posted February 2, 2005 Author Share Posted February 2, 2005 Thanks to both of you. Very useful information ( the token thing was my next question ) Link to comment Share on other sites More sharing options...
Pontifice Posted February 5, 2005 Author Share Posted February 5, 2005 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.