Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llReleaseControls

Melorie Boxen
Registered User
Join date: 5 Mar 2009
Posts: 14
03-25-2009 00:56
hi,

i was wondering if it's possible to write a script which does basically the same than calling the menu option world->ReleaseKeys.
i tried to use llReleaseControls() but that didn't work. do i need to specify each control or is it just the wrong function to use.

thanks for your help ...
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
03-25-2009 09:59
No, it's the correct function, and there are no parameters, so it should work. Perhaps the calling script that took control has to be the one to release them.
_____________________
My tutes
http://www.youtube.com/johanlaurasia
Melorie Boxen
Registered User
Join date: 5 Mar 2009
Posts: 14
03-25-2009 18:01
The problem is, i don't have permissions for the calling script because i bought the object (its a whiteboard) but it's just very inconvenient to use the menu->release key option all the time. thats why i would like to use a script and link it to the board ...

any ideas?
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
03-26-2009 21:48
You could use llRequestPermissions, but since the other script already has your controls, that might not work as expected.




The only way to do this efficiently, as far as I know, is to modify the main whiteboard script (which I'm guessing is No-Mod).
_____________________
Life is a highway... And I just missed my exit.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
03-27-2009 00:28
From: Melorie Boxen
i was wondering if it's possible to write a script which does basically the same than calling the menu option world->ReleaseKeys.
llDetachFromAvatar();

That's what the "release keys" option actually does.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
03-27-2009 09:05
From: Argent Stonecutter
llDetachFromAvatar();

That's what the "release keys" option actually does.


Will that work if it's not attached?

A script can take controls without being in an attachment. I have no idea what llDetachFromAvatar does() when it's in an unattached object. Would it release all permissions from any scripts running in the object? Or just control permissions?

In any case, this would work only if the whiteboard is mod so you can drop in a script, and you'd have to figure out when to make your script call the function.

Basically, your best bet is to ask the whiteboard maker to provide an option to not take controls, or to find a whiteboard that behaves the way you want.

As mentioned above, llReleaseControls() only releases the permissions that the script calling it has, and doesn't affect any other scripts.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
03-27-2009 10:25
From: Lear Cale
Will that work if it's not attached?
I didn't think the Release Controls works if it's not attached or you're not sitting on the object. I've been stuck with controls owned by vehicles that I'd been "unsit"ted from and "Release Controls" didn't do any good.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
03-27-2009 12:56
From: Argent Stonecutter
I didn't think the Release Controls works if it's not attached or you're not sitting on the object. I've been stuck with controls owned by vehicles that I'd been "unsit"ted from and "Release Controls" didn't do any good.

It does work, at least, typically. For a short while I was taking controls from MLPV2 scripts in the bed, when you sit on the poseballs (to allow you to turn expressions on/off). That failed miserably because the scripts couldn't tell which av hit the control (all scripts' control handlers would be invoked, and the passed avatar was the owner or some stupid thing, not the av who actually hit the key). On stand, the scripts would release controls, and it seemed to work. IIRC, the "release controls" button that's now gone would disappear immediately as I stood. Note that I'm not sitting on the object contaning the script, I'm sitting on an unlinked poseball.

But my question was about llDetachFromAvatar(), since you mentioned it. I would expect this to be a no-op if the object isn't attached.