|
Gruntos Baxter
Registered User
Join date: 15 Jan 2007
Posts: 20
|
02-01-2007 10:17
is it possible to listen on chan 0 for a a member of a group instead of the owner? llListen(0, "", llGetOwner(), ""  works for me as the owner but what if I want to accept commands from anyone in the same group. if I use NULL_KEY and llSameGroup(key id) where woud I get the ID of the group? Is there a better way of doing it? Regards
|
|
Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
|
02-01-2007 11:53
The only way I have found to do this is to leave the llListen statement open to listen to everyone, then in the listen event, make your first test to see if the speaker was in the same group: state_entry() { llListen(0,"","",""); }
listen(integer channel,key id, string name, string message) { if(llSameGroup(id)) { // all your regular listen event code } }
-Atashi p.s. apologies if I haven't got the syntax *exact*, I'm just doing this off the top of my head. But this is the general idea of how I've done it with success.
|
|
Gruntos Baxter
Registered User
Join date: 15 Jan 2007
Posts: 20
|
02-01-2007 14:51
that's what I expected I'll run a few tests
|
|
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
|
02-01-2007 15:22
That example will work... at the great expense of processing time required for your script to parse every single statement it hears said in the public open channel.
If there is any other way to do whatever it is you want to do, I'd recommend that. Otherwise, you risk being the cause of undue lag.
|