|
Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
|
05-31-2006 08:14
I have an object that I only want to listen to the owner (or other designated person) via llListen, and a HUD attachment that communicates with the object via llSay on the appropriate channel. If others have the HUD also, can they also communicate with the object? Is there a way to know that the communication coming from the HUD is coming from me? ...or other avi?
|
|
Bitzer Balderdash
Dazed and Confused
Join date: 21 Dec 2005
Posts: 246
|
05-31-2006 08:24
Normally, for a manually controlled item, when you set up the llListen() you can add a filter for the key to which to listen, or, alternatively, one of the parameters passed into the listen event is the key of the person / object speaking.
Of course, since this is one object talking to another, the keys will change each time they are rezzed. If you are just trying to stop accidental overlaps, then do something like include the owner's key in the message that the HUD generates to the object.
If you are worried about people deliberately injecting commands into they system, then you are going to need to look at encrypting the stream in some way.
|
|
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
|
05-31-2006 09:09
Perhaps you should include a check in the listen event that the object which spoke the command is owned by the same person. llGetOwner() == llGetOwnerKey(llDetectedKey(0))
|
|
Perwin Rambler
Registered User
Join date: 24 Mar 2005
Posts: 152
|
What I did
05-31-2006 09:49
Mind you this has been a bit since I wrote the code but.....
Give the HUD / object a command / Menu option to listen for a new Key.
Give the other object a command / Menu option to send it's key or even a random listening channel..
tell the HUD to listen and the object to send... They will only communicate to each other.
I used this for a prim digital readout for my assault gun. I would give examples but I am at work and do not have the code on me.
Yes the one object could have someone override the key sequence while you are doing it, IF they know what the original listening channel was on. However there is nothing stoping you from re keying at any time.
|