Jump to content

How to save variables across scripts


merczous

Recommended Posts

I am trying to store variables so it may be used in two different scripts (object and effect scripts). By following the "Variable Reservoir" section from the geck website (http://geck.bethsoft.com/index.php/Adding_an_Options_Menu#External_Links); it doesn't seem to work. The script with the lines of code which is attempting to call the VR variables is causing errors and the script itself won't save because of it.

 

I also tried creating a global variable in the Object Window (Misc -> Global), but the Geck won't let me

 

any help with finding a method to store some variables which I can store and call its value from different scripts would be great!

 

thank you

Link to comment
Share on other sites

I am trying to store variables so it may be used in two different scripts (object and effect scripts). By following the "Variable Reservoir" section from the geck website (http://geck.bethsoft.com/index.php/Adding_an_Options_Menu#External_Links); it doesn't seem to work. The script with the lines of code which is attempting to call the VR variables is causing errors and the script itself won't save because of it.

 

I also tried creating a global variable in the Object Window (Misc -> Global), but the Geck won't let me

 

any help with finding a method to store some variables which I can store and call its value from different scripts would be great!

 

thank you

 

Have you made sure the VR script is attached to a quest? I think for a variable reservoir a quest/quest script would be the best solution.

 

For example, if you have a quest named MyVRquest and a script called MyVRquestSCRIPT attached to it, you can manipulate the variables in the script as you wish from any other script.

 

Say you have a declared variable in the MyVRquestSCRIPT script called iMyVar, you could then set it from some other script by calling (for example) Set MyVRquest.iMyVar to 1

or use it as a condition with if MyVRquest.iMyVar == 1 and so forth..

Edited by Oes10
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...