Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need a little help with llReleaseControls

Becky Tardis
Registered User
Join date: 15 Nov 2005
Posts: 98
01-05-2006 16:26
Ok, I have a bug with one of my scripts, the controls never releases. If I click on the release keys button, it disappears, and the object is detacted. But if I detact the object the release keys button never goes away until I log off. Clicking on the release keys button does nothing. Here is a few snipplets of my code, maybe someone out there can help me.

Thank you in advance.

takeControls(integer passOn)
{

llTakeControls(CONTROL_DOWN,TRUE,passOn);
llTakeControls(CONTROL_UP,TRUE,passOn);
llTakeControls(CONTROL_FWD | CONTROL_BACK,TRUE,passOn);
llTakeControls(CONTROL_LEFT | CONTROL_RIGHT,TRUE,passOn);


}

state default
{
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TAKE_CONTROLS)
{
takeControls(TRUE);
}
}

attach(key id)
{
integer perm = llGetPermissions();

if (id != NULL_KEY)
{
if ((perm & PERMISSION_TAKE_CONTROLS) == FALSE)
{
llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS);

}
my_id = id;
} else {
llReleaseControls();
llRequestPermissions(llGetOwner(),0);
}
}
}
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
01-06-2006 03:51
I'm sorry for not looking through your script carefully, but I suspect your custom function works correctly. Are four llTakeControls available? I guess that the control event handler will be invoked as soon as the first llTakeControls has been called.
_____________________
:) Seagel Neville :)
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
01-06-2006 10:15
It sounds suspiciously like you might have another attachment that's also taking controls.
Retam Hax
Registered User
Join date: 25 May 2007
Posts: 1
Suspect its a general bug in SL
05-25-2007 03:05
I have experienced this in several vehicles.

It always occur when I fly into a restricted area with the vehicle, then I am thrown out of the vehicle, then This problem occurs till I restart SL.

-a newbie