Don't click here unless you want to be banned.

LSL Wiki : global

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org

global

In general, global is something that applies or exists in all cases, compared to local.

item explanation
global function Any user-defined function or LSL function.
global variable A global variable is declared outside of a state, event, or function.
global coordinate A global coordinate differs from a local coordinate in that their origin point is not relative to any sim. Local coordinates are either relative to the region or object in question.
global axes Unrotated world space (that objects are positioned in), compared to local object axes which can be rotated relative to the global one.



LSL Example:
string j = "Global Hi";
integer i = 50;
default {
     state_entry() 
     {
          string i = "Hello there!"; //This WILL compile just fine, unlike in Java.
          llOwnerSay(i); //Will say "Hello there!". this is the local variable, accessed only in this part of the script
          llOwnerSay(j); //Will say "Global Hi", this is the global variable that can be accessed anywhere in the script
     }
}





script | scope | local
There is no comment on this page. [Display comments/form]