Difference between revisions of "Variables and Properties"

145 bytes added ,  06:52, 13 February 2012
imported>Evernewjoy
imported>Evernewjoy
Line 245: Line 245:
;to the script-as-a-property that contains the
;to the script-as-a-property that contains the
;the variable you want to access
;the variable you want to access
;Note you must set the scriptVar here, do not try
;to initialize scriptVar to masterScript, this line
;must be in the body of the script itself


scriptVar.publicInt += 1
scriptVar.publicInt += 1
Line 296: Line 301:


* 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.


* Remember to set the scriptVar to the script-as-a-property, the highlighted line in the script itself.
* Remember to set the scriptVar to the script-as-a-property, the highlighted line in the script itself.
Anonymous user