Difference between revisions of "Variables and Properties"
Jump to navigation
Jump to search
→From a non-owned fragment / other quest script
imported>Evernewjoy |
imported>Evernewjoy |
||
Line 159: | Line 159: | ||
int hiddenInt = 144 ;initialized value | int hiddenInt = 144 ;initialized value | ||
;the name of the property/var you want to use in | ;the name of the property/var you want to use in other scripts, which is just a wrapper for the hidden var | ||
int property publicInt | int property publicInt | ||
Line 283: | Line 282: | ||
If you do not make an instance of the script that contains the variable you want to access, you cannot use the variable, you must have an object with the variable-reservoir script attached to itself. | If you do not make an instance of the script that contains the variable you want to access, you cannot use the variable, you must have an object with the variable-reservoir script attached to itself. | ||
And remember to set the scriptVar to the script-as-a-property, the highlighted line in the script itself. | And remember to set the scriptVar to the script-as-a-property, the highlighted line in the script itself. |