merczous Posted November 27, 2010 Share Posted November 27, 2010 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 More sharing options...
Oes10 Posted November 27, 2010 Share Posted November 27, 2010 (edited) 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 1or use it as a condition with if MyVRquest.iMyVar == 1 and so forth.. Edited November 27, 2010 by Oes10 Link to comment Share on other sites More sharing options...
Interfer0 Posted November 27, 2010 Share Posted November 27, 2010 When you create the quest script like MyvRquestSCRIPT make sure you change the top box from Object to Quest. Otherwise in the quest you won't be able to select it as the quests script. Link to comment Share on other sites More sharing options...
Recommended Posts