Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Is There A Script To Unlink?

Mako Davidson
Registered User
Join date: 27 Jun 2006
Posts: 56
06-30-2007 08:44
I'm wondering if there is a script to unlink a multi-prim object say on_touch, if so would someone please have an example???
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-30-2007 09:38
Not a script, a handy function:

http://www.lslwiki.net/lslwiki/wakka.php?wakka=llBreakAllLinks

Note you'll need to get perms first.
Mako Davidson
Registered User
Join date: 27 Jun 2006
Posts: 56
thanks Qui
06-30-2007 09:41
I'll check it out now
Mako Davidson
Registered User
Join date: 27 Jun 2006
Posts: 56
Ok this is what I have but still no idea
06-30-2007 10:06
syntax error :(

integer PERMISSION_CHANGE_LINKS
default
{
state_entry()
{
}

touch_start(integer total_number)
{
llBreakAllLinks
}
}
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-30-2007 10:32
try something like:
CODE

integer gotPerms; //not really necessary, but kinda shows the flow

default
{
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_CHANGE_LINKS);
}
run_time_permissions(integer perms)
{
if (perms & PERMISSION_CHANGE_LINKS)
gotPerms = TRUE;
}
touch_start(integer total_number)
{
if (gotPerms)
llBreakAllLinks();
}
}
Mako Davidson
Registered User
Join date: 27 Jun 2006
Posts: 56
thanks mate
06-30-2007 11:29
cheers mate anything you tell me works so, I know it will thanks again :)