OsForceBreakAllLinks
From OpenSimulator
(Difference between revisions)
m (Added permissions and delay information) |
m (Change See Also) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
|threat_level=VeryLow | |threat_level=VeryLow | ||
− | |permissions=${ | + | |permissions=${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
|delay=0 | |delay=0 | ||
|function_syntax=osForceBreakAllLinks() | |function_syntax=osForceBreakAllLinks() | ||
|description=* Identical to llBreakAllLinks() except that it doesn't require the link permission to be granted. Present in 0.8 and later. | |description=* Identical to llBreakAllLinks() except that it doesn't require the link permission to be granted. Present in 0.8 and later. | ||
+ | |ossl_example=<source lang="lsl"> | ||
+ | // | ||
+ | // osForceBreakAllLinks Script Example | ||
+ | // Author: djphil | ||
+ | // | ||
+ | |||
+ | key target_a = "fbe8ad1b-b7bf-4919-b219-3ebf78e5f607"; | ||
+ | key target_b = "07377b80-0484-4818-9e11-3397e48a32f4"; | ||
+ | integer parent = LINK_ROOT; | ||
+ | integer switch; | ||
+ | |||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | if (osIsUUID(target_a) && osIsUUID(target_b)) | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Touch to see osForceBreakAllLinks usage."); | ||
+ | } | ||
+ | |||
+ | else | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Invalid uuid(s) detected ..."); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | touch_start(integer number) | ||
+ | { | ||
+ | if (switch = !switch) | ||
+ | { | ||
+ | osForceCreateLink(target_a, parent); | ||
+ | osForceCreateLink(target_b, parent); | ||
+ | } | ||
+ | |||
+ | else | ||
+ | { | ||
+ | osForceBreakAllLinks(); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | changed(integer change) | ||
+ | { | ||
+ | if (change & CHANGED_LINK) | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "The number of links have changed."); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | |additional_info=This function was added in 0.8-post-fixes | ||
}} | }} | ||
+ | == See Also == | ||
+ | * [[osForceBreakAllLinks]] | ||
+ | * [[osForceCreateLink]] | ||
+ | * [[osForceBreakLink]] |
Latest revision as of 18:56, 5 December 2020
osForceBreakAllLinks()
| |
| |
Threat Level | VeryLow |
Permissions | ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
Extra Delay | 0 seconds |
Example(s) | |
// // osForceBreakAllLinks Script Example // Author: djphil // key target_a = "fbe8ad1b-b7bf-4919-b219-3ebf78e5f607"; key target_b = "07377b80-0484-4818-9e11-3397e48a32f4"; integer parent = LINK_ROOT; integer switch; default { state_entry() { if (osIsUUID(target_a) && osIsUUID(target_b)) { llSay(PUBLIC_CHANNEL, "Touch to see osForceBreakAllLinks usage."); } else { llSay(PUBLIC_CHANNEL, "Invalid uuid(s) detected ..."); } } touch_start(integer number) { if (switch = !switch) { osForceCreateLink(target_a, parent); osForceCreateLink(target_b, parent); } else { osForceBreakAllLinks(); } } changed(integer change) { if (change & CHANGED_LINK) { llSay(PUBLIC_CHANNEL, "The number of links have changed."); } } } | |
Notes | |
This function was added in 0.8-post-fixes |
[edit] See Also
- osForceBreakAllLinks
- osForceCreateLink
- osForceBreakLink