Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llpermissions Q

Cow Hand
Registered User
Join date: 20 Feb 2006
Posts: 292
04-03-2006 19:06
Ok, I'm new to this, so I'm a little confused. I'm trying to set permissions to play this animation whenever I /pull out my ninja sword and turn off the permission when I /put my sword away. Easy enough, but I'm having problems because the object keeps saying that I don't have permission.

I'm not sure how to *get* permission let alone give it permission to release the animation.

If anyone could help or point me to a site that can help, I'd really appreciate it.

Thanks!!
Cow Hand
Registered User
Join date: 20 Feb 2006
Posts: 292
04-03-2006 19:52
Here is the script I am working with - I'm trying to make it so that when I type /9 pull guns that the hold_r_handgun animation kicks on and when I type /9 put away, it kills it.

However, I'm having problems because it says I don't have proper Permissions :( Any help would be greatly appreciated!

THE SCRIPT:

//This is the command used to make the onject show itself. You can change it to what ever you like.
string sCommand = "pull guns";

//This is the command used to make the onject hide itself. You can change it to what ever you like.
string hCommand = "put away";

//This is the channel which the object will listen to. It is set to channel 9 so to make it work you will say '/9' then the command.
integer chan = 9;

//this is the time that the object will display itself for before it automatically hides itself, it is set to 0 so you will se the box when you rez it.
integer time = 0;

//This script automatically turns the object to phantom, If you wish it to be solid then change this value to FALSE.
integer switch = TRUE;

//---------------------------------------------------------------------

default
{
state_entry()
{
llListen(chan,"",llGetOwner(),"";);
llSetStatus(STATUS_PHANTOM,switch);
llSetTimerEvent(time);
}

listen(integer channel, string name, key id, string msg)
{
if (msg == sCommand)
{
llSetAlpha(1,ALL_SIDES);
llSetTimerEvent(time);

}

if (msg == hCommand)
{
llSetAlpha(0,ALL_SIDES);
}
}
timer()
{
llSetAlpha(0,ALL_SIDES);
}
on_rez(integer start_param)
{
llResetScript();
}


}
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
04-04-2006 09:28
llRequestPermission() and the run_time_permissions() event.