Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Secont try: How to send message to a prim worn by an AV

Zozo Plympton
Registered User
Join date: 26 Oct 2006
Posts: 26
12-27-2006 17:07
Sorry... my first question wasn't detailed enough :(

I would like to implement the possibility of an Avatar triggering some functionality which resides in a script of an object worn by another AV. This other avatar is not in the same palce as the first one but somewhere "far far" away. :)
The message will not have to be sent frequently and the whole thing may become a comercial product... sometime in the future.

I thought of using llEmail but for that I would have to operate some kind of "server" which would keep track of the KEY where the email has to be sent as the "other" AV may change sims.

Is there an easy way to send some message to as script worn by another AV travelling in SL?

Thanks for your attention
Zozo
Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
12-27-2006 18:20
It would have bn best if yu had replied to your original thread, but I guess we can just pick it up from here..

for posterity, here is a link to the original thread

Onto the issue at hand:

Email may be your only option..

You have to give consideration to a couple things...
1. An object must POLL for new emails. This means that the email event does not fire automatically. Instead you need to use a llSetTimerEvent() and timer event to call the llGetNextEmail() function.
2. If you are going to send an email to an object you need to know its key. The key only changes when an object is rezzed into the world. Therefore, your concerns about an AV moving across a sim border are erroneous. However, if you want to contact an attachment using email, you have to know its key every time it is rezzed into the world. The attachment should probably contact a "server" in the on_rez event (perhaps at other times also depending on your needs and script functionality) to register its key. You will need a persistent object in world if you want to track the keys of attachments owned by others.

edit to add: I'd be happy to help you in world if you need it. Feel Free to IM me
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
12-27-2006 20:03
Going to hijack part of this thread to keep from having to resurrect another one. My apologies Champie, it is clear now you are trying to help.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
12-28-2006 03:36
From: Jesse Barnett
Going to hijack part of this thread to keep from having to resurrect another one. My apologies Champie, it is clear now you are trying to help.


Jesse, I'm glad you reminded me that we should be as helpful as possible if we choose to respond. You reminded me that I could have been much more helpful and less "smart-ass" than I was. You acted in the interest of preserving the helpful nature of this community and in the interest of a new resident.

The many people like yourself make this community a success. Thanks.
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
12-28-2006 10:13
If you have a web server available, you can use llHTTPRequest on the object's attach event to notify a web server of its new key and use XMLRPC to open a comm channel, then have the calling object use llHTTPRequest/XMLRPC to send commands.

If you don't have a web server available, email is your only option.
Zozo Plympton
Registered User
Join date: 26 Oct 2006
Posts: 26
12-29-2006 03:36
If anybody with some more experience with using llEmail():

What would be an "acceptable" rate for calling llGetNextEmail() on the receiver side?

Or maybe the real question is: Where is the thereshold where the freqvency of the call to llGetNextEmail() is excesive or caues "issues"?

Thanks for your input.
Peekay Semyorka
Registered User
Join date: 18 Nov 2006
Posts: 337
12-29-2006 04:22
If the script is going to be used by a lot of people, consider waiting at least 30 seconds or one minute between polls. My free email-IM routers poll every 120 seconds and no one has ever complained (yet.) My email-ATM system waits even longer.

Having said that, most scripts I've seen poll every 5 seconds, which I think is excessive.

When there are multiple pending emails (i.e., the event handler's num_left parameter is non-zero), then it's acceptable to immediately call llGetNextEmail() again, until the queue is cleared.

-peekay
Zozo Plympton
Registered User
Join date: 26 Oct 2006
Posts: 26
12-29-2006 05:25
Thanks for the reply.
Right now I am polling every 15 seconds which on the light of your answer doesn't seem bad at all.
When an Email is received I turn off the timer and poll all the emails until there are no more left to process. After processing all the emails I turn the timer on again.