Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

A lil Help Please

Knight Nootan
Registered User
Join date: 26 May 2008
Posts: 73
08-01-2009 15:38
I want to have an object that is attached to the avatar detach after a timer event. I have tried to request perms on attach but it doesnt seem to work as I read it has to have perms to be able to detach. What am I doing wrong or what do I need to do to do this?

Thanks
jeaniesing Trilling
Loves to animate & script
Join date: 21 Oct 2006
Posts: 61
08-01-2009 15:52
default
{
on_rez(integer rezzed)
{
if(llGetAttached()>0)llSetTimerEvent(20);//if its attached, set the timer - that way you don't get errors when you put it on the ground
}

run_time_permissions(integer run)
{
llDetachFromAvatar();//permission granted, off it comes
}
timer()
{
llRequestPermissions(llGetOwner(),PERMISSION_ATTACH);
}
}
_____________________
Pinastri/113/171/30