LsGetWindlightScene

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (made parameters into link to LightShare parameters)
m (Change See Also)
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
= lsGetWindlightScene =
 
= lsGetWindlightScene =
 
== Function ==
 
== Function ==
[[list]] lsGetWindlightScene([[list]] rules);
+
'''list''' lsGetWindlightScene('''list''' rules);
  
Get a list of the current [[Windlight]] settings in the scene
+
Get a list of the current [http://wiki.secondlife.com/wiki/WindLight_settings Windlight settings] in the scene
* [[list]] rules - a list of the [[LightShare Parameters]] to retrieve
+
* '''list''' rules - a list of the [[LightShare Parameters]] to retrieve
  
 
An empty rules list will return an empty result list.
 
An empty rules list will return an empty result list.
Line 12: Line 12:
  
 
== Examples ==
 
== Examples ==
  list rules_to_get = [ WL_WATER_COLOR ];
+
<source lang="lsl">
  list settings;
+
//
  default {
+
// lsGetWindlightScene Script Exemple
     state_entry() {
+
// Author: djphil
      settings = [[lsGetWindlightScene]](rules_to_get);
+
//
      llOwnerSay("Water color is: "+llList2String(settings,1));
+
 
 +
default
 +
{
 +
     state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Touch to see lsGetWindlightScene usage.");
 
     }
 
     }
  }
 
  
  Water color is: <4.000000,38.000000,64.000000>
+
    touch_start(integer number)
 +
    {
 +
        list rules = [WL_WATER_COLOR];
 +
        list settings = lsGetWindlightScene(rules);
 +
        llSay(PUBLIC_CHANNEL, "The current water color is: " + llList2String(settings, 1));
 +
    }
 +
}
 +
</source>
 +
 
 +
The current water color is: <4.000000, 38.000000, 64.000000>
  
 
== Notes ==
 
== Notes ==
Line 29: Line 42:
 
== See Also ==
 
== See Also ==
 
=== Functions ===
 
=== Functions ===
*[[lsSetWindlightScene]]
+
* [[lsGetWindlightScene]]
*[[lsSetWindlightSceneTargeted]]
+
* [[lsSetWindlightScene]]
 +
* [[lsSetWindlightSceneTargeted]]
 +
* [[lsClearWindlightScene]]
  
 
=== Articles ===
 
=== Articles ===
*[[LightShare]]
+
* [[LightShare]]
*[[LightShare Parameters]]
+
* [[LightShare Parameters]]
  
 
== Deep Notes ==
 
== Deep Notes ==
 
=== All Issues ===
 
=== All Issues ===
*http://opensimulator.org/mantis/search.php?project_id=1&search=lsGetWindlightScene&hide_status_id=-2
+
* http://opensimulator.org/mantis/search.php?project_id=1&search=lsGetWindlightScene&hide_status_id=-2
 +
 
 +
[[Category:Scripting]]

Revision as of 02:12, 19 December 2020

Contents

lsGetWindlightScene

Function

list lsGetWindlightScene(list rules);

Get a list of the current Windlight settings in the scene

An empty rules list will return an empty result list.

Caveats

The list returned by this function cannot be passed directly to lsSetWindlightScene without triggering C# exceptions from the Simulator.

Examples

//
// lsGetWindlightScene Script Exemple
// Author: djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see lsGetWindlightScene usage.");
    }
 
    touch_start(integer number)
    {
        list rules = [WL_WATER_COLOR];
        list settings = lsGetWindlightScene(rules);
        llSay(PUBLIC_CHANNEL, "The current water color is: " + llList2String(settings, 1));
    }
}

The current water color is: <4.000000, 38.000000, 64.000000>

Notes

Returned rules contain pairs of data in the form of the parameter requested followed by the current value. In the example above, the request returns [ 0, <4.000000,38.000000,64.000000> ] when used with default LightShare settings in a region.

See Also

Functions

Articles

Deep Notes

All Issues

Personal tools
General
About This Wiki