Difference between revisions of "Cross Script Variables"

Jump to navigation Jump to search
53 bytes added ,  08:35, 24 December 2010
imported>Bruneauinfo
imported>Bruneauinfo
Line 7: Line 7:
A scenario for creating and testing this type of functionality includes at least three features:  
A scenario for creating and testing this type of functionality includes at least three features:  


1 - A quest script that acts as the database for storing values. (One might want to read over the article [[Quest scripts]] to get familiar with the source of this idea.)
1 - A script that acts as the database for storing values. (One might want to read over the article [[Quest scripts]] to get familiar with the source of this idea.)


2 - A script that writes a value to one of the variables in the "database" Quest script when it is activated.  
2 - A script that writes a value to one of the variables in the "database" Quest script when it is activated.  
Line 45: Line 45:
====Notes====
====Notes====


*You should NOT assign starting values to your variables. If you need to do this, do it using some other method. Setting values within this script essentially locks the value in. There may be a workaround for doing this, but more testing will be required.
*If you assign starting values to your variables in the "database" script use a doOnce variable to keep the variables from being reset to their initial values on every frame refresh. Setting values within this script's Begin-End block without a doOnce will essentially "lock in" the values to their initial setting.


*The variable names listed in the script can be named whatever you like - preferably something meaningful to their purpose.  
*The variable names listed in the script can be named whatever you like - preferably something meaningful to their purpose.  
Line 122: Line 122:
</pre>
</pre>


If you use this script exactly as written the message box will show the name of your reference rather than the reference. See [[MessageBoxEx]] for more. But the reference value is there and ready to use.  
If you use this script exactly as written the message box will show the name of your reference rather than the reference. See [[MessageBoxEx]] for more. But the reference value is there and ready to use.


== Practical Applications ==
== Practical Applications ==
Anonymous user

Navigation menu