OsResetEnvironment
From OpenSimulator
(Difference between revisions)
(Add exemple) |
m (Small changes in the script) |
||
Line 21: | Line 21: | ||
state_entry() | state_entry() | ||
{ | { | ||
− | llSay(PUBLIC_CHANNEL, "Touch to see osResetEnvironment usage | + | llSay(PUBLIC_CHANNEL, "Touch to see osResetEnvironment usage with a transition of " + (string)transition); |
} | } | ||
− | + | ||
touch_start(integer number) | touch_start(integer number) | ||
{ | { | ||
Line 37: | Line 37: | ||
result = osResetEnvironment(switch, transition); | result = osResetEnvironment(switch, transition); | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
if (switch == 1 && result == 1) | if (switch == 1 && result == 1) |
Revision as of 16:00, 2 December 2020
integer osResetEnvironment(integer ParcelOrRegion, integer transition)
| |
Resets parcel or region environment.
if return is negative the operation failed. | |
Threat Level | This function does not do a threat level check |
Permissions | Prim owner must have estate manager rights or parcel and parcel environment change rights |
Extra Delay | 0 seconds |
Example(s) | |
// // osResetEnvironment Script Example // Author: djphil // integer transition = 3; integer switch; default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch to see osResetEnvironment usage with a transition of " + (string)transition); } touch_start(integer number) { integer result; if (switch =! switch) { result = osResetEnvironment(switch, transition); } else { result = osResetEnvironment(switch, transition); } if (switch == 1 && result == 1) { llSay(PUBLIC_CHANNEL, "The parcel environment was removed with success."); } else if (switch == 1 && result == -1) { llSay(PUBLIC_CHANNEL, "The parcel environment was removed without success."); } else if (switch == 0 && result == 1) { llSay(PUBLIC_CHANNEL, "The region environment was set to the default with success."); } else if (switch == 0 && result == -1) { llSay(PUBLIC_CHANNEL, "The region environment was set to the default without success."); } } } | |
Notes | |
Added in 0.9.2 |