Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Communicating over long distance within one sim

Gorana Kolache
Registered User
Join date: 28 Feb 2006
Posts: 18
07-29-2006 06:15
Hello everyone,

thank you for listening about my problem, because i think you answered it many times already.

I use a shuttle which should fly from my land up to a club i made. Distance between two points is about 300m. My problem is how can i communicate with shuttle (which is physics based object), brom both stations. I would like to make an object/prim on which you click to call shuttle to com to your station.

What are your expiriences about communication between 2 scripts, located in 2 objects which are about 300m away. What can you recomend, and if possible just point me in which direction should i work.

Thank you very much,

G.
Archanox Underthorn
Registered User
Join date: 20 May 2003
Posts: 168
07-29-2006 17:13
You have a few different options.

-The simplest is just to use an llShout, this reaches to anything in the same sim

-You can send an email to the object using llEmail, this is generally slower and lags the script, but cant be heard by other scripts
_____________________
Archatek

Home to some of the highest quality katanas and other blades available in SL. Co-creator of the Samurai Island Combat System, one of the best melee combat systems available, come check it out!

___________________
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
07-29-2006 17:54
From: Archanox Underthorn
-The simplest is just to use an llShout, this reaches to anything in the same sim

Doesn't shout have range of ~100 m or so? So 300 m is kinda too far to cover...

re: the original question, was thinking of some kind of 'delivery courier' -- a temp-on-rez item that's rezzed, receives message to carry and the destination, then uses warpPos to move there and pass it onto specified channel. An alternative to mails, i guess o.O;
Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
07-29-2006 17:59
llShout is 100m, won't reach across a sim.

llEmail is probably your best option without bringing in outside servers and stuff.
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
07-29-2006 18:46
Probably the easy option, seeing as the two points are fixed, is to have two prims relay the communications from ground up, using llShout. Ground -> Relay @ 100m -> Relay @ 200m -> Club @ 300m.
Gorana Kolache
Registered User
Join date: 28 Feb 2006
Posts: 18
07-30-2006 04:03
Thanks a lot for all your tips.

I was thinking of that multiple prims located on the way, but i never thought of that llEmail.

Well, time is not that big issue because shuttle needs 35 seconds to reach from one or other station, so adding another 2 secs is not that big issue.

I'll look into your tips and see what can i do.

As soon as i get it working, you all are invited to visit the Club.

Thank you,

G.
Gaius Goodliffe
Dreamsmith
Join date: 15 Jan 2006
Posts: 116
07-30-2006 07:13
From: Angela Salome
Probably the easy option, seeing as the two points are fixed, is to have two prims relay the communications from ground up, using llShout. Ground -> Relay @ 100m -> Relay @ 200m -> Club @ 300m.

Easier still to just rez a temp-on-rez message prim that immediately warps to the target loc, whispers the message, and dies. Less lag-prone and takes less prims, too.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
07-30-2006 12:31
If it's a fixed message and not too frequent, you could also use llGiveInventory(). That way you don't have to have any listeners.
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
07-30-2006 14:08
llGiveInventory() as a message? what do you mean? a notecard of a command
and a reader at the destination?
-LW
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
07-30-2006 14:23
From: Lightwave Valkyrie
llGiveInventory() as a message? what do you mean? a notecard of a command and a reader at the destination?
Yes, basically. Email is more precise, but if you just need to send the message "launch now", then llGiveInventory is likely easier and doesn't require timers. Just have your receiving prim delete the notecard and you're set.

If you do decide to do it this way, there are a couple things to remember.

First, you don't need to have the notecard actually read by the receiver with llGetNotecardLine, even if you have a dozen or more commands. Just have different notecards named accordingly in your sender object, and send them as needed. Then use llGetInventoryName when the notecard arrives.

Second, you'll want to delete notecards as they show up, after getting the data from them.


Another option is to use llRemoteLoadScriptPin. This may be a better and more secure method than llGiveInventory and notecards, since it'll prevent anybody else dropping inventory on your object. This will require you to use link messages to communicate with your main script, or alternatively, you can have your script simply replace the existing one, if your project can be set up that way. That would eliminate the need to delete the sent script, but would also stop you from being able to collect any other data, as the script would be replaced regularly.

Personally, I would likely opt for llRemoteLoadScriptPin and link messages.
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-30-2006 14:31
for the record shout is 100m radius, which is 100m in 1 direction 100 in another, if your relay is centered you can cover 200m

From: someone

Shouts text on channel. llShout range is a 100m radius sphere centered on the calling object.
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
07-30-2006 14:42
From: Catherine Omega
If you do decide to do it this way, there are a couple things to remember.

First, you don't need to have the notecard actually read by the receiver with llGetNotecardLine, even if you have a dozen or more commands. Just have different notecards named accordingly in your sender object, and send them as needed. Then use llGetInventoryName when the notecard arrives.

Second, you'll want to delete notecards as they show up, after getting the data from them.

Just as addition to that, might want to make sure the notecard actually "is there" ... that is, using just renamed New Note that you create from inventory window menu seems to cause problems, in the sense such notecard never actually gets deleted from item inventory (at least it didn't for me when i tried) Even if the note is renamed.

It would only start working properly after i opened this New Note, entered any random character and then deleted it (this was just to enable "save" button) ... then saved it. The notecard was still empty after that but was finally treated like "real" item i.e. could be used to make copies with different names to transfer different messages, and could be deleted after, and such. o.O;
Gorana Kolache
Registered User
Join date: 28 Feb 2006
Posts: 18
07-30-2006 15:51
From: Gaius Goodliffe
Easier still to just rez a temp-on-rez message prim that immediately warps to the target loc, whispers the message, and dies. Less lag-prone and takes less prims, too.


yay! thats the solution :) Thankies :D

G.