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