Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Permission to activate animations and attach to HUD

Owner Maltese
Registered User
Join date: 13 Sep 2005
Posts: 65
01-20-2006 10:13
Hi. I'm modifing CrystalShard Foo's (BTW, I LOVE you CrystalShard! By using your scirpts I've learned a lot!!!) free poseball script to have someone animate a pose and then have a HUD attached to the center of the screen.

I can't for the life of me get the item to attach to the HUD after it gets rezzed.

Here is the code snippet that I changed.

CODE
 
run_time_permissions(integer perm)
{
if(perm == PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("sit");
llStartAnimation(ANIMATION);
if(visible == TRUE)
base_alpha = llGetAlpha(ALL_SIDES);
else
base_alpha = 1.0;
llSetAlpha(0.0,ALL_SIDES);
llSetText("",<1,1,1>,1);

//Below is the part I added.
eul = <93,0,0>;
eul *= DEG_TO_RAD;
quat = llEuler2Rot( eul );
llRezObject("Door", llGetPos() + <0.021, -1.069, -0.077>, ZERO_VECTOR, quat, 0);
}
if (perm == PERMISSION_ATTACH)
{
insidekey = llGetInventoryKey("Inside");
llRezObject("Inside", llGetPos() + <2, 0, 0>, ZERO_VECTOR, ZERO_ROTATION, 0);
}
}

object_rez(key insidekey)
{
llAttachToAvatar(35);
}



I appericiate the help.

Thanks.
Owner Maltese
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
01-20-2006 10:36
Which object is this script on? Door, or Inside? And, are the Door and Inside objects placed in the inventory of the object with the script?

Beware that you can't attach anything to avatars or HUDs other than the object's owner. So only you would be able to use this HUDball if it was placed; is that what you intend?
Owner Maltese
Registered User
Join date: 13 Sep 2005
Posts: 65
Oops Sorry.
01-20-2006 12:26
It's supposed to make the "Inside" a HUD.

The door rezzes and does what it's supposed to. The "Inside" is in the inventory of the pose ball, and has all permissions.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
01-20-2006 12:34
If you want Inside to attach to HUD, shouldn't the code to request attach permissions and call Attach2Av be in the Inside object, and not in the object that rezzes Inside?