OsSetEstateSunSettings

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| width="100%" style="border: thin solid black"
+
{{osslfunc
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
|threat_level=Nuisance
|- valign="top"
+
|function_syntax= osSetEstateSunSettings(integer sunFixed, float sunHour)
|'''Threat Level''' || <Threat Level goes here>
+
|ossl_example=<source lang = "lsl">
 +
// ----------------------------------------------------------------
 +
// Example / Sample Script to show function use.
 +
//
 +
// Script Title:    osSetEstateSunSettings.lsl
 +
// Script Author:
 +
// Threat Level:    Nuisance
 +
// Script Source:  http://opensimulator.org/wiki/osSetEstateSunSettings
 +
//
 +
// Notes: See Script Source reference for more detailed information
 +
// This sample is full opensource and available to use as you see fit and desire.
 +
// Threat Levels only apply to OSSL & AA Functions
 +
// See http://opensimulator.org/wiki/Threat_level
 +
// ================================================================
 +
// C# Source Line:      public void osSetEstateSunSettings(bool sunFixed, double sunHour)
 +
// Inworld Script Line: osSetEstateSunSettings(integer iSunFixed, float fSunHour);
 +
//
 +
// Example of osSetEstateSunSettings
 +
//
 +
integer iTest = TRUE;
 +
integer iSunFixed;
 +
float fSunHour;
  
|- valign="top"
+
default
|'''Function Syntax''' || <source lang="lsl">
+
{
osSetEstateSunSettings(bool sunFixed, double sunHour);
+
    state_entry()
</source>
+
    {
|- valign="top"
+
        llSay(0,"Touch to see osSetEstateSunSettings used to change Sun Position ");
|'''Example(s)||
+
    }
  
|}
+
    touch_start(integer total_num)
 +
    {
 +
        if(iTest)
 +
        {
 +
            iTest = FALSE;
 +
            iSunFixed = TRUE; // TRUE = Sun stationary, FALSE = use global time & move
 +
            fSunHour = 19.00;  // The "Sun Hour" that is desired, 0...24, with 0 just after SunRise
 +
            // Set the prepared texture to the Prim
 +
            osSetEstateSunSettings(iSunFixed, fSunHour);
 +
        }
 +
        else
 +
        {
 +
            iTest = TRUE;
 +
            iSunFixed = FALSE;
 +
            fSunHour = 10.00;
 +
            osSetEstateSunSettings(iSunFixed, fSunHour);
 +
        }
 +
        llSay(0,"osSetEstateSunSettings : SunFixed = ["+iSunFixed+"], SunHour = ["+fSunHour+"]");
 +
    }
 +
}
  
[[Category:OSSL Functions]]
+
</source>
[[Category:OSSL_functions_without_example]]
+
|description=This function does nothing on 0.9.2. This function allowed for an estate owner or manager to change the sun settings for the entire estate.
[[Category:OSSL functions without threat level]]
+
|
 +
}}

Latest revision as of 10:43, 5 October 2020

osSetEstateSunSettings(integer sunFixed, float sunHour)
This function does nothing on 0.9.2. This function allowed for an estate owner or manager to change the sun settings for the entire estate.
Threat Level Nuisance
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
// ----------------------------------------------------------------
// Example / Sample Script to show function use.
//
// Script Title:    osSetEstateSunSettings.lsl
// Script Author:
// Threat Level:    Nuisance
// Script Source:   http://opensimulator.org/wiki/osSetEstateSunSettings
//
// Notes: See Script Source reference for more detailed information
// This sample is full opensource and available to use as you see fit and desire.
// Threat Levels only apply to OSSL & AA Functions
// See http://opensimulator.org/wiki/Threat_level
// ================================================================
// C# Source Line:      public void osSetEstateSunSettings(bool sunFixed, double sunHour)
// Inworld Script Line: osSetEstateSunSettings(integer iSunFixed, float fSunHour);
//
// Example of osSetEstateSunSettings
//
integer iTest = TRUE;
integer iSunFixed;
float fSunHour;
 
default
{
    state_entry()
    {
        llSay(0,"Touch to see osSetEstateSunSettings used to change Sun Position ");
    }
 
    touch_start(integer total_num)
    {
        if(iTest)
        {
            iTest = FALSE;
            iSunFixed = TRUE; // TRUE = Sun stationary, FALSE = use global time & move
            fSunHour = 19.00;   // The "Sun Hour" that is desired, 0...24, with 0 just after SunRise
            // Set the prepared texture to the Prim
            osSetEstateSunSettings(iSunFixed, fSunHour);
        }
        else
        {
            iTest = TRUE;
            iSunFixed = FALSE;
            fSunHour = 10.00;
            osSetEstateSunSettings(iSunFixed, fSunHour);
        }
        llSay(0,"osSetEstateSunSettings : SunFixed = ["+iSunFixed+"], SunHour = ["+fSunHour+"]");
    }
}
Personal tools
General
About This Wiki