OsSetRegionWaterHeight

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
<source lang="lsl">
+
{|  width="100%" style="border: thin solid black"
 +
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
 +
|- valign="top"
 +
|'''Threat Level''' || <Threat Level goes here>
 +
 
 +
|- valign="top"
 +
|'''Function Syntax''' || <source lang="lsl">
 +
 
 +
</source>
 +
|- valign="top"
 +
|'''Example(s)||<source lang="lsl">
  
 
// Region Water Height utility
 
// Region Water Height utility
Line 29: Line 39:
 
</source>
 
</source>
  
 +
|}
  
 
+
[[Category:OSSL Functions]]
[[Category:OSSL]]
+
 
[[Category:OSSL functions without threat level]]
 
[[Category:OSSL functions without threat level]]
 
[[Category:OSSL functions without function syntax]]
 
[[Category:OSSL functions without function syntax]]

Revision as of 12:18, 11 June 2011

OsSetRegionWaterHeight
Threat Level <Threat Level goes here>
Function Syntax
 
Example(s)
// Region Water Height utility
// I know, it's probably horribly inefficient and confusing, but it works.
// Arkaniad Exonar, '10
 
float g_WaterHeight; // <---- Storage Var
integer g_ListenChan = 0;
list g_ltmp; // <--------Temporary buffer
 
default
{
    state_entry()
    {
        llListen(g_ListenChan, "", llGetOwner(), ""); //Prepare listener
        llSay(0, "Ready for commands");
    }
    listen(integer channel, string name, key id, string message)
    {
        g_ltmp = llParseString2List(message, [" "], []); // Split the message into chunks
        if(llList2String(g_ltmp, 0) == "/waterheight") // Self explanatory
        {
            osSetRegionWaterHeight(llList2Float(g_ltmp, 1)); // Set the region water height to the specified value
            llSay(0, "Setting region water height to "+llList2String(g_ltmp, 1)+"m (In case anyone was wondering)");
            g_ltmp = []; // Flush buffers
        }
    }
}
Personal tools
General
About This Wiki