LsGetWindlightScene

From OpenSimulator

Revision as of 00:57, 19 December 2020 by Djphil (Talk | contribs)

Jump to: navigation, search

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.");
        llSetText("lsGetWindlightScene", <1.0, 1.0, 1.0>, 1.0);
    }
 
    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