Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSay() from a HUD

Sundi Metropolitan
Registered User
Join date: 14 Sep 2005
Posts: 24
07-26-2006 22:22
I am using llSay() from a hud to communicate with a worn object. I want to filter the chat in the object to chat from the owner, but the hud does not send the owner's key. It sends a key but not the key for owner of the hud.

So can anyone tell me how to filter the chat coming from a HUD and being received by a worn object?
Aodhan McDunnough
Gearhead
Join date: 29 Mar 2006
Posts: 1,518
07-26-2006 22:25
Don't use the key because it will change everytime you login or teleport (or attach?)

Filter the message using the HUD object name, use a really strange number for the channel and maybe add some security codes to the message itself so that the attachment can verify the sender.
_____________________
Aodhan's Forge shop at slurl.com/secondlife/Rieul/95/213/107
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
07-26-2006 23:04
The simplest way is to filter for name as already mentioned. Then, assuming you want only the owner's commands to work and an if statement in your listener for:

if(llGetOwnerKey(id) == llGetOwner() )

so you can check the owner of the HUD is the same as the owner of the listening object. Obviously the llGetOwner() bit can be tidied into something less heavy.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Sundi Metropolitan
Registered User
Join date: 14 Sep 2005
Posts: 24
Thanks!
07-27-2006 18:06
Thanks for you help! It is working now. :)