Warcraft III resources & community, 2003–2006 · archived

Setting Local's

5 posts
#1

Setting Local's

I was wondering if there is a way to set a variable to a local witout using jass. I herd there is a custom script function wich can makes a variable local. So anyone know a way to make a variable local witout the use of jass?
#2
of course you can't convert a global to a local. yo can, however, declare them in 'custom script' tags if they are at THE VERY START of the actions.
#3
By any chance do you know the custom script wich will declare a global a local?
#4
I'm not sure if I understood you correctly, but when you declared the local via custom script, you'll need custom script again every time you use the variable. To set a variable in JASS, just write
set variable1 = VariableOrFunction2

and variable1 will be set to the value that results of the right side of the "=". Don't forget to add udg_ before the names of globals you declared in the variable window.
#5
you dont declare a global a local. you make a local

if you want to set it to the value of a global, it would be

Custom Script - local (type) (name) = (value)