Difference between revisions of "Cross Script Variables"
m
no edit summary
imported>Bruneauinfo |
imported>Bruneauinfo m |
||
Line 3: | Line 3: | ||
If you are looking for a way to get the value of a variable from one script running on one object to a script running on another object I imagine you may have entered the above article name or something similar to it in your search for an answer. As you first begin writing mods you will probably notice that Oblivion assumes the only variables that should be universally accessible are the Global variables. This would not be a terrible thing except that all Global variables are treated as ''floats''. (See [[Floating Point]].) | If you are looking for a way to get the value of a variable from one script running on one object to a script running on another object I imagine you may have entered the above article name or something similar to it in your search for an answer. As you first begin writing mods you will probably notice that Oblivion assumes the only variables that should be universally accessible are the Global variables. This would not be a terrible thing except that all Global variables are treated as ''floats''. (See [[Floating Point]].) | ||
It is possible a time will come in writing a script when you will wish to have a repository to store variable values | It is possible a time will come in writing a script when you will wish to have a repository to store variable values that can be read from and written to by any script. Fortunately this is possible. This article addresses a method for not only storing and retrieving non-float numeric values, but object references as well. This could prove very handy when creating dynamic game scenarios. | ||
== The Basics == | == The Basics == |