Page 1 of 1

need help with all of those level and local variables

Posted: Wed Jul 11, 2007 10:12 pm
by erick
does anyone know where a document is that explains all the level and local variables. :?
EX: What does level.elepos mean? I know that it is for checking elevator position but other than that i know nothing
Could someone help me :?:

<edit> And could someone post the ubersound work around global script?
I dont have it and the download link doesnt work anymore.

Posted: Thu Jul 12, 2007 12:25 pm
by bdbodger

Code: Select all

thread1:

local.box = $box1

end

thread2:

local.box = $box2

end
In those two threads local.box is not the same entity because a "local" variable only has meaning inside the thread it is in if I had used

Code: Select all

thread1:

level.box = $box1

end

thread2:

level.box = $box2

end
then when thread1 runs level.box is $box1 but as soon as thread2 runs then level.box is then equal to $box2 a level variable can be used in any part of the script and it will have only one meaning unlike a local variable that can have different meanings in different threads outside of the thread you can't use it the script won't know what it is . If I try this

Code: Select all

thread1:

local.box = $box1

end

thread2:

if (local.box = $box1)

end
I will get an error that says that local.box is NIL or NULL in thread2

Doc

Posted: Thu Jul 12, 2007 1:25 pm
by tltrude
The document is named "Script Files.txt" and its in MOHAATools\docs. But, it is not very easy to read. There are scripting tutorials around.

Posted: Tue Jul 17, 2007 12:52 am
by erick
thanks i will look at the document
thanks for the explanation bdbodger, it helped me understand the variable meanings