OsReplaceParcelEnvironment
From OpenSimulator
integer osReplaceParcelEnvironment(integer transition, string daycycle)
| |
Replaces parcel daycycle.
| |
Threat Level | This function does not do a threat level check |
Permissions | Prim owner must have rights to change parcel and parcel environment and region must allow parcel environments |
Extra Delay | 0 seconds |
Example(s) | |
// // osReplaceParcelEnvironment Script Example // Author: djphil // // Can be daycycle's name in object's inventory or the daycycle uuid string daycycle_a = "Daycycle_A"; string daycycle_b = "Daycycle_D"; integer transition = 3; integer switch; default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch to see osReplaceParcelEnvironment usage."); llSay(PUBLIC_CHANNEL, "Transition: " + (string)transition + " second(s)."); } touch_start(integer number) { integer result; if (switch =! switch) { result = osReplaceParcelEnvironment(transition, daycycle_a); llSay(PUBLIC_CHANNEL, "daycycle_a: " + daycycle_a); } else { result = osReplaceParcelEnvironment(transition, daycycle_b); llSay(PUBLIC_CHANNEL, "daycycle_b: " + daycycle_b); } if (daycycle_a == "" || daycycle_a == NULL_KEY || daycycle_b == "" || daycycle_b == NULL_KEY) { llSay(PUBLIC_CHANNEL, "The environment of the parcel has been deleted"); } if (result > 0) { llSay(PUBLIC_CHANNEL, "The Parcel Environment was replaced with success."); } else if (result < 0) { llSay(PUBLIC_CHANNEL, "The Parcel Environment was replaced without success."); } } } | |
Notes | |
Added in 0.9.2 |
See Also
- osReplaceAgentEnvironment
- osReplaceParcelEnvironment
- osReplaceRegionEnvironment
- osResetEnvironment