02-05-2006 20:27
I'm sure there are probabally a million differant ways people have suggested for implementing this, and this is probabally a way that's already been suggested, but I just figured I'd post in here to see if there are any reasons why this wouldn't be a good way to do it. And to see if anyone has ways that would be a better implementation of it.

And I also know that this most likely won't get implemented any time soon if ever. Or at least not until after MONO...

(Posted following the instruction notecard at Kelly Linden's Add LSL Functions drop box.)

CODE
This one comes in two parts.

The sending part:

1. llObjectMessage(key objectKey, string msg)
2. This function allows objects to send messages to another without the script being
delayed nor spamming the chat channels.
2.1 It takes the key of the object it wants to send to and a string to send to another
object.
2.2 It doesn't need to return anything unless you would want to implement some sort
of debug info to acknowlege sending and/or recipt. Most likely something simple
like TRUE or FALSE.
3. There is currently no way to direct object to object communication.

The recieving part.

1. object_message (key senderKey, string msg)
2. This would be a new event and is triggered when an object recives an instant
message from another object.
2.1 It takes the key of the object that sent it and a string.
2.2 It doesn't return anything since it's a state event?
3. Similar code to base it off of would be the link_message() event.


I also sadly am only starting to learn C (I really should have gotten around to it years ago) and do not know Java, so I can't show how to do it in either language for section 3 of the two parts.

Does this seem like a good way of going about it or am I just missing some obvious errors in my thought process? Also, it probabally would be good to include some sort of mechanism to keep someone from setting up an object to just spam and crash objects but the only way I can think of doing that currently is by delaying the script on llObjectMessage() which I'd rather not have happen, though it's a small sacrifice for direct object to object communication I suppose.

I suppose it doesn't really matter in the end since this is one of those things people have been asking for since before I started playing SL.

And sorry for re-visiting what is probabally a very old debate. Be kind I'm sorta new? :D
_____________________
^-^

Signed,
Gorgarath,
Whom in this game called Second Life,
plays the avatar Folco Boffin,
and in this game called First Life,
plays the avatar John McDonnell.