Just to further explain "level". Level is used to detect things happening across the entire script, it is mostly used in vairables or "waittill" scripts..
For example, if I place the code:
Code: Select all
main()
{
thread runNotfiy();
level.waiting = true;
level waittill("continue");
...
}
runNotify()
{
wait 60;
level notify("continue");
level.waiting = false;
}
So, basically, it is a way for the script to communicate across the entire script and not just in the single function.
This is also similar to the way "self" works when applied to a player or entity, you can communicate across the entire script, but it will be linked to an entity and not the level.