LsSetWindlightSceneTargeted

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Examples)
m
Line 1: Line 1:
 
= lsSetWindlightSceneTargeted =
 
= lsSetWindlightSceneTargeted =
 
== Function ==
 
== Function ==
[[integer]] lsSetWindlightSceneTargeted([[list]] rules,[[key]] who);
+
'''integer''' lsSetWindlightSceneTargeted('''list''' rules,'''key''' who);
  
Set a list of [[Windlight]] settings in the scene to new values for a specific targeted user.
+
Set a list of [http://wiki.secondlife.com/wiki/WindLight_settings Windlight settings] in the scene to new values for a specific targeted user.
  
* [[list]] rules - a list containing pairs of [[LightShare Parameters]] and values to set
+
* '''list''' rules - a list containing pairs of [[LightShare Parameters]] and values to set
* [[key]] who - the [[UUID]] of the person to change Windlight settings for
+
* '''key''' who - the UUID of the person to change Windlight settings for
  
 
== Caveats ==
 
== Caveats ==
The list used by this function cannot be passed directly from [[lsGetWindlightScene]] without triggering C# exceptions from the [[Simulator]].
+
The list used by this function cannot be passed directly from [[lsGetWindlightScene]] without triggering C# exceptions from the Simulator.
  
[[LightShare]] must be enabled in the [[Simulator]].
+
[[LightShare]] must be enabled in the Simulator.
  
This script function is restricted to the region owner only, who may use it to set [[Windlight]] settings for others in the region.
+
This script function is restricted to the region owner only, who may use it to set [http://wiki.secondlife.com/wiki/WindLight_settings Windlight settings] for others in the region.
  
 
== Examples ==
 
== Examples ==

Revision as of 10:15, 3 August 2011

Contents

lsSetWindlightSceneTargeted

Function

integer lsSetWindlightSceneTargeted(list rules,key who);

Set a list of Windlight settings in the scene to new values for a specific targeted user.

  • list rules - a list containing pairs of LightShare Parameters and values to set
  • key who - the UUID of the person to change Windlight settings for

Caveats

The list used by this function cannot be passed directly from lsGetWindlightScene without triggering C# exceptions from the Simulator.

LightShare must be enabled in the Simulator.

This script function is restricted to the region owner only, who may use it to set Windlight settings for others in the region.

Examples

list settings = [ WL_WATER_COLOR, <4.000000,38.000000,64.000000> ];
  integer success;
  default {
    state_entry() {
      success = lsSetWindlightScene(settings,llGetOwner());
      if ( success == TRUE ) {
        llOwnerSay("Success!");
      } else {
        llOwnerSay("Failed!");
      }
    }
  }

Notes

Rules contain pairs of data in the form of the parameter followed by the value to set.

Setting new parameters with lsSetWindlightScene commits the new changes to the regionwindlight database table immediately.

Excessive use of this function can cause unnecessary database requests.

Use this function if you wish to avoid database loading with lsSetWindlightScene.

See Also

Functions

Articles

Deep Notes

All Issues

Personal tools
General
About This Wiki