Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sending a message to a group

Temptation Lane
Registered User
Join date: 3 Apr 2007
Posts: 13
04-08-2007 09:55
I'm trying to get a script to send a message to a group, but I'm pretty new to this and I've hit a wall. My options seem to be:

- Send a message to the group (Not possible as far as I can tell so far - can someone confirm?)
- Ennumerate the group members, and IM each of them in turn - still looking into this.
- Have a notecard with a list of people to be messaged, and read this manually (should definitely be possible when I learn how!)

If the first option isn't possible and I have to send individual IMs, I'd ideally like to be able to send IM's only to people currently online - that *should* be possible as far as I can tell, since there are plenty of escort ads about that can tell you when someone is online - if it can show a green light, it can send a message, right? Can anyone give me a pointer on how I can check if someones online? Also, any info on how I can either read a notecard or ennumerate group membership would also be great.

Thanks

Temptation
Twisted Pharaoh
if ("hello") {"hey hey";}
Join date: 24 Mar 2007
Posts: 315
04-08-2007 10:19
There are no group management functions in LSL, the only thing you could do is to set the object to the group and message people of the group who would be detected around the object.

What you could do instead is make an attachment, that members of the group would wear and then the attachment could forward messages to them, though it would be a semi-complex script (not really a nightmare but not feasable by a beginner). And people leaving the group would still receive messages.
Temptation Lane
Registered User
Join date: 3 Apr 2007
Posts: 13
04-08-2007 10:48
Thanks Twisted

That's probably a little over-complex, and requiring someone to carry an item with them isn't really ideal for my script. I've done a bit of digging though, and it seems llInstantMessage might do what I need with a bit of tweaking. As far as my limited knowledge can tell, this should be possible and fairly straightforward:

- Av clicks on object
- Object checks to see if AV is currently activated in the required group, and if so, displays a dialog to turn messages on or off
- Object can then use llInstantMessage to send messages directly to av regardless of currently active group membership

Granted, there's still the issue of people leaving the group continuing to receive messages, but I could tackle this by either allowing currently subscribed users to unsub regardless of group membership, or by adding an owner function to moderate subscriptions. As far as I can tell, all of that *should* be fairly basic stuff.
Twisted Pharaoh
if ("hello") {"hey hey";}
Join date: 24 Mar 2007
Posts: 315
04-09-2007 00:18
Or you could reset messaging every 24 hours and have your group members come back to your place and register again after that. That shouldn't be too much of a hassle.