1. The HUD sends out a simple llSay message from it's buttons on a HUD channel.
2. The attachment which has multiple prims has a single listener script in the root prim. The listener script hears the HUD, and translates that into sending a llMessageLinked message depending on which button was pushed, to the correct next script through a series of "if.. else if" statements. This allows the attachment to have only one listen.
3. If the desired action requires targeting an object or agent, a sensor / dialogue script in a 2nd prim "hears" that linked message. The sensor / dialogue script "hears" that linked message and passes the desired Key to the end result script in a 3rd prim. If no targeting is needed the listener sends a message directly to the desired end script in the 3rd prim.
4. The end script performs it's function.
5. There are a number of end scripts, which basically need to run an animation, produce an effect such as a particle, or rezz an object, etc.)
Everything works other than one big issue:
Animations permissions for the wearer of the attachment (the owner) are giving me fits. The only way I have gotten an end script to run an animation so far is by each end script requesting permissions when it is run. I tried changing the design of the attachment to put the scripts in the root prim and it is still requiring permissions.
Is there a way to get a "global" permission for the attachment that asks once upon attachment and serves for all scripts? Or is there something I'm not doing that will stop the need for owner animation permissions?
Here's the portion of an "end script" that attempts to animate:
CODE
link_message(integer sender_num, integer num, string str, key id)
{
if ( num == object_num )
{
if ( str == messageExample )
{
TargetKey = id;
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
llStartAnimation("dothis");
llSleep(1);
llSay(0, "'Example'");
ParticleStart();
llPlaySound("5d7f611c-d622-8288-6e08-986b0ef47337",1.0);
llSleep(6);
llStopAnimation("dothis");
}
}
} // end of link_message stateCODE
;