|
Roenik Newell
Registered User
Join date: 14 Jan 2006
Posts: 15
|
03-13-2009 16:28
I'm trying to write a script that will animate an avatar based on certain chat on channel 2.
The script will go inside an object which will be attached to an avatar.
The llRequestPermissions function (for animating) is inside the state_entry event, but I'm never asked for permission when I wear the item.
I'm new to LSL, any help would be appreciated.
Thank you.
-Roe
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
03-13-2009 16:35
If you are sitting on an object, or wearing it as an attachment, you won't get the dialog asking about animation permission.* It's automatically granted in those cases.
You can use llGetPermissions() and llGetPermissionsKey() to check that the permissions are what you think they should be. Also, you should make use of the run_time_permissions event to track when the permissions are actually granted (it's not always instantaneous).
* that is, if the script inside what you are sitting on or wearing.
|
|
Roenik Newell
Registered User
Join date: 14 Jan 2006
Posts: 15
|
03-13-2009 18:03
Thank you for the reply.
That answers why I wasn't asked for permission.
My other problem is that I have a few listening handles active, and I'm not sure how to wrap my listen function into the run_time_permissions state.
-Roe
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
03-13-2009 18:25
I guess that short answer is that you wouldn't usually want to do that. You can start up an llListen inside run_time_permission I guess, just remember to use llListenRemove to clean up old listeners if you might be setting listens repetitively.
If you mean that you already have a listener set up and want to pick up some chat, you can't do that inside run_time_permissions, you need to do that inside a listen event. If you need to know inside the listen event if permissions have been granted, you can use the functions I mentioned up in the other post, or set global variables to track what's been done.
It might help, if you're still stuck, to post a simple version of the script you are trying to iron out. Maybe there is an easier way to get where you are trying to go!
|