Thread: Modding SW3?
View Single Post
  #442  
Old 12-30-2014, 03:41 PM
Nanaki Nanaki is offline
Approved Member
 
Join Date: Mar 2010
Posts: 338
Default

Quote:
Originally Posted by nocalora29 View Post
Do you maybe know how to Save global variables?, Because I'd like to save some Numbers and or Strings that I can Read/Load trough an Systems Activate.script File.
Code:
setglobal("x", x);
the x in quotes is the variable to be saved, while the second x is the name of the variable to be saved.

You can then call those globals from any script, so long as the script does not have a defined local with the same name.

Note that Global variables should be a last resort thing, as they generally tend to eat more resources than local variables.
Reply With Quote