Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llRegionSay() across multiple sims?

Leyah Renegade
Live Musician
Join date: 2 Nov 2006
Posts: 125
03-31-2008 07:28
I have a build that uses quite a few llRegionSay() statements to give chat commands to objects. The build has now expanded to two sims, which means I now have to figure out a way to get the commands to work across both of them. Any good tips?

We need an llEstateSay() function! :D
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
03-31-2008 10:13
These are contiguous sims? If so put a relay object at one corner that repeats the regionsay on a little used channel. Have a listener over the border (but less than 20m away) that listens for the relay say and then rebroadcasts as regionsay on the original channel

Non-contiguous sims? You'll have to get into object email.
_____________________
http://slurl.com/secondlife/Together
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
03-31-2008 10:35
I dont know that llRegionSay goes beyond the borders of a sim, I was always under the impression that, rather than distance, simply every object in the sim hears it and that's it. You'd have to use llRegionSay to broadcast to the sim, then have another object near the boarder that does a regular llSay, and a receiver just across the border. Although, I'd probably get into object email to communicate across sims regarless of weather it's contiguous or not.
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
03-31-2008 11:05
In the general scripting spirit of "offering every possible solution" one could also have regionsayers in each sim, which poll an external site repeatedly for the latest message, and a central device (or web page) to add the latest one. This would also allow the keys of the regionsayers to change as much as one would like, without them having to register themselves with a central command box or suchlike (so they could be rezzed, deleted and re-rezzed at will) and would work regardless of continuous land.

If I had several sims which needed commanding in this way that is what I would do these days.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
03-31-2008 12:54
From: Johan Laurasia
I dont know that llRegionSay goes beyond the borders of a sim

It doesn't. What I was saying was to listen to what is said on regionsay -- say it across the border -- then rebroadcast using regionsay. ;)
_____________________
http://slurl.com/secondlife/Together
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
03-31-2008 15:27
From: Escort DeFarge
It doesn't. What I was saying was to listen to what is said on regionsay -- say it across the border -- then rebroadcast using regionsay. ;)


So the first object would do both regionsay and shout (100 meters), the object in the next sim would both listen for the shout then broudcast the message again.
Kidd Krasner
Registered User
Join date: 1 Jan 2007
Posts: 1,938
03-31-2008 17:13
From: Max Pitre
So the first object would do both regionsay and shout (100 meters), the object in the next sim would both listen for the shout then broudcast the message again.

No shouting.

Put two relays in, one on each side of the border between the sims, within 10m of each other. Each one listens on two channels, the Region channel and the Relay channel. Other objects use llRegionSay to send messages on the Region channel. When the relay hears a message on the Region channel (which can only come from other objects in the same sim), it whispers it on the Relay channel. When it hears something on the Relay channel (which can only come from the relay on the other side of the border), it uses llRegionSay to forward it to its own region.

In theory, you could put the relays further apart and say or shout instead of whispering, but there shouldn't be any reason to do that. The relays are not going to move.
Cristalle Karami
Lady of the House
Join date: 4 Dec 2006
Posts: 6,222
03-31-2008 17:17
Why not do as Ordinal says and use http? Have one device push to all devices using http instead of chat/shout or email and have them use regionsay. Save a few prims.
_____________________
Affordable & beautiful apartments & homes starting at 150L/wk! Waterfront homes, 575L/wk & 300 prims!

House of Cristalle low prim prefabs: secondlife://Cristalle/111/60

http://cristalleproperties.info
http://careeningcristalle.blogspot.com - Careening, A SL Sailing Blog
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
03-31-2008 17:37
From: Kidd Krasner
No shouting.

Put two relays in, one on each side of the border between the sims, within 10m of each other. Each one listens on two channels, the Region channel and the Relay channel. Other objects use llRegionSay to send messages on the Region channel. When the relay hears a message on the Region channel (which can only come from other objects in the same sim), it whispers it on the Relay channel. When it hears something on the Relay channel (which can only come from the relay on the other side of the border), it uses llRegionSay to forward it to its own region.

In theory, you could put the relays further apart and say or shout instead of whispering, but there shouldn't be any reason to do that. The relays are not going to move.


Why not use shout on a private channel? That way it broadens the choices one has if one can't get near enough to the second object.
Leyah Renegade
Live Musician
Join date: 2 Nov 2006
Posts: 125
03-31-2008 21:39
From: Escort DeFarge
These are contiguous sims?


Yes.

From: someone

If so put a relay object at one corner that repeats the regionsay on a little used channel. Have a listener over the border (but less than 20m away) that listens for the relay say and then rebroadcasts as regionsay on the original channel


Yeah, that's exactly what I was thinking I'd have to do. Was hoping there was a less kludgy way to do it, but I guess not.
Leyah Renegade
Live Musician
Join date: 2 Nov 2006
Posts: 125
03-31-2008 21:45
From: Cristalle Karami
Why not do as Ordinal says and use http? Have one device push to all devices using http instead of chat/shout or email and have them use regionsay. Save a few prims.


Well we're probably only talking 2 prims here, and actually I could put the relay scripts into
a couple of the prims that comprise an already existing bridge across the sim border. So no extra prims needed. It's not too big a deal. I'm already making quite a few http calls at this build but I think that would be kinda overkill for this purpose.
Cristalle Karami
Lady of the House
Join date: 4 Dec 2006
Posts: 6,222
03-31-2008 22:05
True, but for a larger network of islands, you'd eat up an extra prim per sim.
_____________________
Affordable & beautiful apartments & homes starting at 150L/wk! Waterfront homes, 575L/wk & 300 prims!

House of Cristalle low prim prefabs: secondlife://Cristalle/111/60

http://cristalleproperties.info
http://careeningcristalle.blogspot.com - Careening, A SL Sailing Blog
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
03-31-2008 22:20
From: Cristalle Karami
Why not do as Ordinal says and use http? Have one device push to all devices using http instead of chat/shout or email and have them use regionsay. Save a few prims.

...save a few prims.... cost you the lease of a web server
_____________________
http://slurl.com/secondlife/Together
Kidd Krasner
Registered User
Join date: 1 Jan 2007
Posts: 1,938
03-31-2008 22:28
From: Max Pitre
Why not use shout on a private channel? That way it broadens the choices one has if one can't get near enough to the second object.


I don't know that there's necessarily more work involved in using shout. If the algorithm first filters on channel number, and then worries about distance, then shouting won't matter. But why even worry about it? If you control both sims in their entirety, then there's no reason you couldn't get two objects close enough.

And worrying about using one more prim on a sim is silly, when there are sure to be objects using far more prims that could be eliminated or replaced with lower prim equivalents.
Leyah Renegade
Live Musician
Join date: 2 Nov 2006
Posts: 125
04-01-2008 07:38
From: Kidd Krasner
I don't know that there's necessarily more work involved in using shout. If the algorithm first filters on channel number, and then worries about distance, then shouting won't matter. But why even worry about it? If you control both sims in their entirety, then there's no reason you couldn't get two objects close enough.

And worrying about using one more prim on a sim is silly, when there are sure to be objects using far more prims that could be eliminated or replaced with lower prim equivalents.


Yeah, not only that but I don't even need to use one more prim... there are existing structures that have a prim close to the border where I can put the relay script.

You're certainly right that there are lots of other things on the sims that could no doubt be more prim efficient. :D
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
04-01-2008 14:44
Be careful if you have multiple such relays. It is easy to create an infinite feedback loop. Might want to add random message IDs to detect repeated messages or some such.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
04-02-2008 11:06
personally I like the paired prim repeater whisper, with a seperate channel.

you can filter however you like, key word, owner, object name, channel, etc...

the basic outline would be
CODE

integer region_channel = 42;
integer repeat_channel = 43;

default{
state_entry(){
llListen( region_channel, "", "", "" );
llListen( repeat_channel, "", "", "" );
}

listen( integer vIntChannel, string vStrName, key vKeySpeaker, string vStrHeard ){
//-- your filter wil probably be different
if (vIntChannel == region_channel){
llWhisper( repeat_channel, vStrHeard );
}else{
llRegionSay( region_channel, vStrHeard );
}
}
}
CODE


place above script in paired objects at sim edge, or 4 in the matching corners for a ful quad... as long as there are only a single pair on any particular border, there is no worry about echoing back (since objects can't hear themselves)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Cristalle Karami
Lady of the House
Join date: 4 Dec 2006
Posts: 6,222
04-02-2008 11:21
From: Escort DeFarge
...save a few prims.... cost you the lease of a web server

You've got broadband? You probably have free web space as part of your internet service package. And there are free options out there.
_____________________
Affordable & beautiful apartments & homes starting at 150L/wk! Waterfront homes, 575L/wk & 300 prims!

House of Cristalle low prim prefabs: secondlife://Cristalle/111/60

http://cristalleproperties.info
http://careeningcristalle.blogspot.com - Careening, A SL Sailing Blog