llShout across sim borders
|
|
Lemieux Primeau
Registered User
Join date: 25 Oct 2006
Posts: 49
|
10-18-2007 20:01
Can a listen event hear an llShout across a sim border?
I didn't see anything specifically addressing this in the wiki. I searched this forum and there are several discussions that talk about doing it.
I have a couple of prims that talk to each other all the time with llShout. But if I put them in adjacent sims, they no longer respond to each other.
They are well under 100 meters apart. I tried both negative and positve chat channels. Scripts are enabled in both sims. The "running" checkbox is checked on both scripts.
Are there any special issues with this?
|
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
10-18-2007 20:04
I've noticed lately that menus don't work if you create them on one side of a sim line then move a meter or 2 into another sim. The docs do say that you have to be within chat range of where the script issued the llDialog when the user pokes the button (yes, I know you're not asking about llDialog but it works via chat..)
Dunno if it used to work but it doesn't seem to any more.
|
|
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
10-18-2007 20:16
Chat does flow across sim boundaries. This is as it always has been, but I know it hasn't changed as I recently attended a Frogg & Jaycat performance at Heron Island, where the stage and audience straddles a border.
Shouts use the same mechanism and should propogate equally well. If memory serves, chat travels 20m, shouts go 96m.
|
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
10-18-2007 20:34
Unless they fixed something in the last week or so, I know it doesn't work for dialogs.
Maybe it's just channel 0 that works now..
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
10-19-2007 05:07
Actually, it seems that llDialog returns don't function strictly like normal chat. I've been able to get responses from dialog button clicks when my av was *well* outside 20m chat range from the scripted object.
For example, I just put this script into an object in my skybox at 700m altitude:
default { state_entry() { llListen( -1000, "", llGetOwner(), "" ); }
touch_start(integer total_number) { llDialog( llDetectedKey(0), "Testing", (list)"Click Me", -1000 ); } listen( integer chan, string name, key id, string message ) { llOwnerSay( name + " said: " + message ); } }
I then clicked on the object so that the Dialog box came up, but didn't click the button. Then I TP'ed to the ground below my skybox, and then clicked the button. I got:
Object: Deanna Trollop said: Click Me
I returned home, clicked the object again, then TP'ed just across the nearest sim border, then clicked the button. Same result. I returned home again, clicked the object, then TP'ed 2 sims away, and clicked the button. Same result.
|
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
10-19-2007 05:21
llOwnerSay worked 2 sims away? 
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
10-19-2007 12:44
Yes, I just found out the other day that a dialog opened while the person and object are in the same sim, will respond to button presses from anywhere in the grid. It's a nifty trick. 
|
|
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
|
10-19-2007 13:06
Object communications and avatar communications are 2 different things in some cases. I've never tried this, but I don't think that a prim can llSay/Shout/Whisper outside of its own sim. The only way I know of for 100% certain that a prim can talk to another prim directly when they are located in different sims is with E-mail.
|
|
Lemieux Primeau
Registered User
Join date: 25 Oct 2006
Posts: 49
|
10-21-2007 14:59
Ok, so my issue was my code. But it led me to something I didn't know about before and is either not in the wiki or I just missed it.
Whenever I do chat communications between scripts, I usually throw in a line for security to keep people from hijacking my communications. Typically, I check to see if the speaker's owner is the same as the reciever's owner. So, I usually have a global variable for my owner's key called kOwner. Then, at the top of the listen event, I'll do this:
If (kOwner != llGetOwner(id)) return;
The id variable is the argument passed by the listen event that is the key of the speaking object. I've done this many times and it has always worked for me with no problems. However, I have never had a need to cross sim borders with my script communications until now.
In doing so, it turns out that the id argument is not the key of the speaking object if the speaking object and receiving object are in two different sims. Or at least it is not the same key passed as if the listener is in the same sim as the speaking object.
A valid key was being passed. I didn't bother checking to see who's it was. Maybe the owner of the sim that the speaking object is in? Like when chat leaves a sim, it does so with a proxy identity?
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
10-21-2007 21:58
From: Lemieux Primeau The id variable is the argument passed by the listen event that is the key of the speaking object. I've done this many times and it has always worked for me with no problems. However, I have never had a need to cross sim borders with my script communications until now. Per the wiki, llGetOwnerKey returns the key passed to it if that key is for an object/agent not in the same sim as the object calling it.
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
10-22-2007 01:39
I recall reading in (one of) the wikis somewhere that when you touch an object and trigger a dialog menu, the menu speaks as if they avatar is saying it, but, from the position of the object with the calling script. This was done to ensure that the listening object would be in range if the avatar moved outside the range of the listener.
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
10-22-2007 02:56
From: Johan Laurasia when you touch an object and trigger a dialog menu, the menu speaks as if they avatar is saying it, but, from the position of the object with the calling script. Aha! Confirmed by placing another test object exactly 20m away from the one calling the dialog, listening on the same channel, which heard the button message, but didn't when I moved it just .01m farther away. Furthermore, when performed on channel 0, I can hear "myself" say the button text within 20m of the object calling the dialog, but not greater than 20m away. Curiously, beyond 10m, "my" chat doesn't appear in grey, to me, at least. I wonder how it would to other avs, and if that would be determined by their distance from my av, or the object.
|