OsSetSunParam

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
----
+
{{osslfunc
'''NOTE''' : This function replaces the deprecated [[osSunSetParam]] function.  
+
|threat_level=None
----
+
|permissions=ESTATE_MANAGER,ESTATE_OWNER
 
+
|delay=0
 
+
|additional_info=This function was added in 0.7.2-post-fixes, And does nothing on 0.9.2
{| width="100%" style="border: thin solid black"
+
|function_syntax= osSetSunParam(string param, float value)
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
|ossl_example=<source lang = "lsl">
|- valign="top"
+
// ----------------------------------------------------------------
|'''Threat Level''' || <Threat Level goes here>
+
// Example / Sample Script to show function use.
 
+
//
|- valign="top"
+
// Script Title:    osSetSunParam.lsl
|'''Function Syntax''' || <source lang="lsl">
+
// Script Author:  WhiteStar Magic
OsSetSunParam(string param, double value);
+
// Example of osSetSunParam
 +
// Params "year_length" = "number of days to a year"
 +
// Params  "day_length" = "number of seconds to a day"
 +
// Params  "day_night_offset" = "induces a horizon shift"
 +
// Params  "update_interval" = "how often to update the sun's position in frames"
 +
// Params  "day_time_sun_hour_scale" = "scales day light vs nite hours to change day/night ratio"
 +
//
 +
string Params = "day_length";
 +
float Value = 4.0;
 +
integer touched = FALSE;
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSay(0,"Touch to see osSetSunParam work.");
 +
    }
 +
    touch_end(integer num)
 +
    {
 +
        if(touched)
 +
        {
 +
            touched = FALSE;
 +
            Value = 4.0;
 +
            osSetSunParam(Params, Value);
 +
            llOwnerSay("Sun Params ("+Params+") = ["+(string)osGetSunParam(Params)+"]");
 +
        }
 +
        else
 +
        {
 +
            touched = TRUE;
 +
            Value = 24.0;
 +
            osSetSunParam(Params, Value);
 +
            llOwnerSay("Sun Params ("+Params+") = ["+(string)osGetSunParam(Params)+"]");
 +
        }
 +
    }
 +
}
 
</source>
 
</source>
|- valign="top"
+
|description='''NOTE'''&nbsp;: This function does nothing on 0.9.2. It did depend on removed Sun module, This function replaced the deprecated [[osSunSetParam]] function.
|'''Example(s)||
+
 
+
|}
+
  
[[Category:OSSL Functions]]
+
|
[[Category:OSSL_functions_without_example]]
+
}}
[[Category:OSSL functions without threat level]]
+

Latest revision as of 11:04, 3 July 2020

osSetSunParam(string param, float value)
NOTE : This function does nothing on 0.9.2. It did depend on removed Sun module, This function replaced the deprecated osSunSetParam function.
Threat Level None
Permissions ESTATE_MANAGER,ESTATE_OWNER
Extra Delay 0 seconds
Example(s)
// ----------------------------------------------------------------
// Example / Sample Script to show function use.
//
// Script Title:    osSetSunParam.lsl
// Script Author:   WhiteStar Magic
// Example of osSetSunParam
// Params  "year_length" = "number of days to a year"
// Params  "day_length" = "number of seconds to a day"
// Params  "day_night_offset" = "induces a horizon shift"
// Params  "update_interval" = "how often to update the sun's position in frames"
// Params  "day_time_sun_hour_scale" = "scales day light vs nite hours to change day/night ratio"
//
string Params = "day_length";
float Value = 4.0;
integer touched = FALSE;
default
{
    state_entry()
    {
        llSay(0,"Touch to see osSetSunParam work.");
    }
    touch_end(integer num)
    {
        if(touched)
        {
            touched = FALSE;
            Value = 4.0;
            osSetSunParam(Params, Value);
            llOwnerSay("Sun Params ("+Params+") = ["+(string)osGetSunParam(Params)+"]");
        }
        else
        {
            touched = TRUE;
            Value = 24.0;
            osSetSunParam(Params, Value);
            llOwnerSay("Sun Params ("+Params+") = ["+(string)osGetSunParam(Params)+"]");
        }
    }
}
Notes
This function was added in 0.7.2-post-fixes, And does nothing on 0.9.2
Personal tools
General
About This Wiki