Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Color Changing from a HUD

Bid Messmer
Registered User
Join date: 13 May 2007
Posts: 13
08-05-2007 05:20
I have an avatar that I have some prims changing color on using a simple HUD I made to pick from a few colors out of this script:

/54/33/108164/1.html

I changed:

integer USE_OWNER_SAY = TRUE;

to FALSE so I could get the HUD to effect the prims on a separate channel (preferred over using voice commands in this instance), and I got the effect I wanted. The problem is, with more than one person using the AV, the HUD changes all of them... I am not sure a good way to get the HUD to change only the owners AV and not all of the ones around it. I don't want to script a new channel into each one. any help is greatly appreciated.
Silje Russell
lsl geek
Join date: 2 Oct 2005
Posts: 63
08-05-2007 07:11
From: Bid Messmer
I have an avatar that I have some prims changing color on using a simple HUD I made to pick from a few colors out of this script:

/54/33/108164/1.html

I changed:

integer USE_OWNER_SAY = TRUE;

to FALSE so I could get the HUD to effect the prims on a separate channel (preferred over using voice commands in this instance), and I got the effect I wanted. The problem is, with more than one person using the AV, the HUD changes all of them... I am not sure a good way to get the HUD to change only the owners AV and not all of the ones around it. I don't want to script a new channel into each one. any help is greatly appreciated.


a simpel way to check if owner of hud and ting you want to change on is same is

if(llGetOwnerKey(id) == llGetOwner())
{
doaction();//
}
_____________________
Yes i know i got typos..
I got writing and reading problems.
but i am still a humen!!
Bid Messmer
Registered User
Join date: 13 May 2007
Posts: 13
08-05-2007 11:41
I'm not quite sure how to implement that. to get the script to react to just the HUD of the owner. I am fairly novice with the scripting language. I know just enough to get into trouble.
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
08-06-2007 07:48
The script you linked to seems to have this option already. The "OWNER_ONLY" variable is supposed to check and only listen to the object owner if that's set to true.
I had some trouble following the script, but it appears that there's no command input, which means you're either doing it manually or through a dialog. But in either case, so long as the init_listen() function in that script is being called, it should be able to discern if the person
speaking is the owner and only react if they are.

If the thing giving the commands is NOT the owner agent, then you'll need:

if (llDetectedOwner(0) == llGetOwner()){
if ( command == COMMAND_CHANGE_COLOR )
set_color(id, argument);
else if ( command == COMMAND_LIST_COLORS )
list_colors(id);
}

where it said

if ( command == COMMAND_CHANGE_COLOR )
set_color(id, argument);
else if ( command == COMMAND_LIST_COLORS )
list_colors(id);

before.