OsGetRegionSize

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{osslfunc |threat_level=None |function_syntax=vector osGetRegionSize() |ossl_example=<source lang="lsl"> default { touch(integer t) { llSay(0, "Region size: "...")
 
m (Whoops)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
|threat_level=None
+
|threat_level=ignored
 +
|permissions=true
 +
|delay=0
 
|function_syntax=vector osGetRegionSize()
 
|function_syntax=vector osGetRegionSize()
 +
|description=Returns the size of the region in meters.
 +
Usually this function returns: <256.000000, 256.000000, 0.000000><br>
 +
However, when called in a var/mega region it returns the size of the entire simulator.
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
 +
//
 +
// osGetRegionSize Script Exemple
 +
// Author: djphil
 +
//
 +
 
default
 
default
 
{
 
{
     touch(integer t)
+
     state_entry()
 
     {
 
     {
         llSay(0, "Region size: " + (string)osGetRegionSize());
+
         llSay(PUBLIC_CHANNEL, "Touch to see osGetRegionSize usage.");
 +
    }
 +
 
 +
    touch_start(integer number)
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "The region size is " + (string)osGetRegionSize());
 
     }
 
     }
 
}
 
}
 
</source>
 
</source>
|description=Returns the size of the region in meters.
+
|additional_info=This function was added in 0.8-post-fixes
 
+
Usually this function returns 256x256.
+
However, when called in the root region of a megaregion it returns the size of the megaregion.
+
|
+
 
}}
 
}}

Latest revision as of 18:58, 5 December 2020

vector osGetRegionSize()
Returns the size of the region in meters.

Usually this function returns: <256.000000, 256.000000, 0.000000>
However, when called in a var/mega region it returns the size of the entire simulator.

Threat Level This function does not do a threat level check
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
//
// osGetRegionSize Script Exemple
// Author: djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osGetRegionSize usage.");
    }
 
    touch_start(integer number)
    {
        llSay(PUBLIC_CHANNEL, "The region size is " + (string)osGetRegionSize());
    }
}
Notes
This function was added in 0.8-post-fixes


Personal tools
General
About This Wiki