OsForceCreateLink: Difference between revisions
From OpenSimulator
Jump to navigationJump to search
imported>Kcozens m Added permissions and delay information |
imported>Djphil m Add See Also |
||
| (7 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
|threat_level=VeryLow | |threat_level=VeryLow | ||
|permissions=${ | |permissions=${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER | ||
|delay= | |delay=1 | ||
|function_syntax=osForceCreateLink(key target, | |function_syntax=osForceCreateLink(key target, integer parent) | ||
|description=* Idential to llCreateLink() except that it doesn't require the link permission to be granted. Present in 0.8 and later. | |description=* Idential to llCreateLink() except that it doesn't require the link permission to be granted. Present in 0.8 and later. | ||
|ossl_example=<source lang="lsl"> | |||
// | |||
// osForceCreateLink Script Example | |||
// Author: djphil | |||
// | |||
key target = "fbe8ad1b-b7bf-4919-b219-3ebf78e5f607"; | |||
integer parent = LINK_ROOT; | |||
integer switch; | |||
default | |||
{ | |||
state_entry() | |||
{ | |||
if (osIsUUID(target)) | |||
{ | |||
llSay(PUBLIC_CHANNEL, "Touch to see osForceCreateLink usage."); | |||
} | |||
else | |||
{ | |||
llSay(PUBLIC_CHANNEL, "Invalid uuid detected ..."); | |||
} | |||
} | |||
touch_start(integer number) | |||
{ | |||
if (switch = !switch) | |||
{ | |||
osForceCreateLink(target, parent); | |||
} | |||
else | |||
{ | |||
osForceBreakLink(2); | |||
} | |||
} | |||
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 02:57, 6 December 2020
osForceCreateLink(key target, integer parent)
| |
| |
| Threat Level | VeryLow |
| Permissions | ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER |
| Extra Delay | 1 seconds |
| Example(s) | |
//
// osForceCreateLink Script Example
// Author: djphil
//
key target = "fbe8ad1b-b7bf-4919-b219-3ebf78e5f607";
integer parent = LINK_ROOT;
integer switch;
default
{
state_entry()
{
if (osIsUUID(target))
{
llSay(PUBLIC_CHANNEL, "Touch to see osForceCreateLink usage.");
}
else
{
llSay(PUBLIC_CHANNEL, "Invalid uuid detected ...");
}
}
touch_start(integer number)
{
if (switch = !switch)
{
osForceCreateLink(target, parent);
}
else
{
osForceBreakLink(2);
}
}
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 | |