Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetAlpha By Childs Name not by sides

Ody Naglo
Registered User
Join date: 1 Apr 2008
Posts: 31
12-12-2008 18:24
Is there anyway to be able to set the Alpha on a child by name?

Example: I have 5 Prims 2 top 2 bottom 1 in the middle (Middle being the Root Prim).

I name the top 2 prims "#1" and the bottom 2 prims "#2" The middle Prim will just be

a random name "Monkey Bones"

The Alpha Script will be in the Root prim only. I give the command "#1" Making Only the top 2 Prims go Alpha Leaving the Rest Solid.

Note: no Scripts at all in any of the prims except the middle prim.

I know you can do this another way by using "sides" But I would like to do it by the Childs name if possible.

Hope Somone can help me out =)

Will Send a Free item to anyone who helps.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
12-12-2008 18:29
llSetLinkAlpha
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
icktoofay Kamachi
Registered User
Join date: 10 Nov 2007
Posts: 17
12-12-2008 18:30
Try this:
CODE
setLinkAlpha(string name,float alpha,integer side) {
integer i;
for(i=0;i<llGetNumberOfPrims();i++) {
if(llGetLinkName(i)==name) llSetLinkAlpha(i,alpha,side);
}
}

default {
state_entry() {
llListen(0,"",llGetOwner(),"");
}
listen(integer channel,string name,key id,string message) {
if(message=="#1") {
setLinkAlpha("#1",0,ALL_SIDES);
}
}
}
Ody Naglo
Registered User
Join date: 1 Apr 2008
Posts: 31
12-12-2008 19:23
Man you rock icktoofay Kamachi I wish I could reach thu the screen and hug you xD Thanks alot you saved me like 200 scripts from my build. Ill send you the Gift Tell me what you think sells for $1,000 =). Ill send u one also Jesse ty for trying xD.