|
Keith Richter
Registered User
Join date: 27 Jan 2007
Posts: 21
|
10-28-2008 17:14
I'm trying to find a way to make a script that listens but for the ID it gets the speakers owner. In other words there will be a prim that says something, and the listener will only respond if the owner of that prim is the owner of itself. Basically, there is llListen(0,"",llGetOwner(),""  ; that would listen for the owners speech, but I need it to get the owner of another object that's talking if thats possible. I been experimenting with llGetOwnerKey but doesn't seem to be working any, or im not setting it up right. Was trying to use if(id == llGetOwnerKey_________ but from there I can't figure out how to make it check that the owners key matches up with it's own owner...I know im sounding repetitive but even to me my word choice seems vague and im trying to explain best i can lol.
|
|
Kaluura Boa
Polygon Project
Join date: 27 Mar 2007
Posts: 194
|
10-28-2008 18:20
This will do it: listen(integer channel, string name, key id, string msg) { if (llGetOwnerKey(id) == llGetOwner()) { llOwnerSay("Another of your objects is speaking to me..."  ; } else { llOwnerSay("I hear somebody else's object."  : } } For that you need to use: llListen(channel, "", NULL_KEY, ""  ; Just don't abuse the PUBLIC_CHANNEL. A negative channel is the best. And if you can also filter the name, that'll be perfect. Note that on a positive channel, the object will also listen to the owner because llGetOwnerKey(llGetOwner()) == llGetOwner(). You're your own owner. For testing/debugging, that's always good to know.
|