Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problem with llSay

Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
06-23-2009 11:37
Ok, this is an old problem - one that drove me mad before until I finally gave up on it. But I couldn't leave it alone, and here it is again.

I have bought a commercial rain machine, which receives instructions on channel 8. The particles and the sound are stopped and started with separate commands: rainon, rainoff, sound on and sound off (spacing correct).

I have a script which broadcasts these calls on chat, but the only one which actually works is the sound command, which switches on and off as it should. The rain one has no effect at all, even though they are adjacent in the script.

I tried to isolate the problem with a separate script:-

default
{
state_entry()
{
llListen(1,"","","";);
}

listen(integer channel, string name, key id, string message)
{
if(message=="rainon";) {
llSay(0,"**************rainon";);
llSay(8,"rainon";);
llSay(8,"sound on";);
}
if(message=="rainoff";) llSay(0,"*************rainoff";);
if(message=="sound on";) llSay(0,"*************sound on";);
if(message=="sound off";) llSay(0,"*************sound off";);
}

}

If I send the command /1 rainon the script will send out the correct commands, but while the sound will switch on, the particles will not appear. If I send the command /8 rainon in chat the rain machine sets off the particles perfectly.

This doesn't make sense to me, and it is something that I first noticed some time ago. I used to have a similar script which worked perfectly; now it does not. Could this be due to the fact that the command that is not working is one that sets off a particle stream? That seems to be the only difference between the two commands.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
06-23-2009 11:50
Is the script listening to channel 8 listening to everyone or only llGetOwner()?
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
06-23-2009 11:55
I assume it's listening to everyone, the command is just given in the normal chat window. The only way I could find out for sure would be to get someone else to try it.
Rime Wirsing
Color me gone
Join date: 31 Dec 2008
Posts: 345
06-23-2009 12:44
From: Argent Stonecutter
Is the script listening to channel 8 listening to everyone or only llGetOwner()?


Is there a way to create a scripted object that acts as an owner proxy for llsay/llregionsay ?

I have some effects that I would like others to be able to turn on/off using a control panel but the effects will only respond to the owner.

Rime
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
06-23-2009 12:51
If this were the problem, why would it be that of two consecutive commands, one of them would work and the other would not?
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
06-23-2009 13:03
From: Selador Cellardoor
If this were the problem, why would it be that of two consecutive commands, one of them would work and the other would not?
Are they talking to the same script? I was assuming you had separate sound and particle scripts you were trying to control.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
06-23-2009 13:06
From: Rime Wirsing
Is there a way to create a scripted object that acts as an owner proxy for llsay/llregionsay ?
No, not unless the listener listens to NULL_KEY and has a check like:

if(id == llGetOwner() || llGetOwnerKey(id) == llGetOwner())

instead of the common:

if(id == llGetOwner())

...

(actually I think llGetOwnerKey(id) == llGetOwner() is good enough now because they made llGetOwnerKey(agents_key) == agents_key)
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
06-23-2009 13:08
From: Argent Stonecutter
Are they talking to the same script? I was assuming you had separate sound and particle scripts you were trying to control.

That'd be my guess, too - that the sound script isn't being quite as strict in validating who the chat's coming from. That or being smarter about it.

Is the script creator still around, Selador? It's not difficult for a script to check that something's coming from the owner or one of the owners objects. Maybe the creator could update their scripts..

edit: or, guess B, that the particle script is outside chat range.. Using llRegionSay instead of llSay should fix that, tho.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
06-23-2009 13:31
This is a commercial rain maker. It has various options, including particle rain and sound. You obtain the particle rain with /8 rainon, and the sound with /8 sound on. The script I listed puts out both commands on channel 8, but only the sound one works. However, if I use the chat window and send /8 rainon in chat, the particles work.

No, the rainmaker is not outside chat range. They are currently next to each other.

I will try to contact the maker.
Vance Adder
Registered User
Join date: 29 Jan 2009
Posts: 402
06-23-2009 14:03
I know the rain maker you are talking about, I have a couple.

The creator is *very* helpful. Awhile back I wanted the ability to use "/8 hide" to hide the rain emitter. The creator IM'd me back the next day and customized the script right there for me, sending me a new copy of both that I had purchased. I believe he integrated that improvement into his sold copies as well.

So... definitely contact him. I bet he'll be a big help and maybe he'll permanently improve the device with your suggestion.
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
06-23-2009 17:38
Yes, you were right. He was very helpful, and said that the validation was different on the rain and the sound inputs. He swapped my version for a version in which both inputs were treated the same, and I am delighted to say that my script now works. :)

Many thanks to everybody for their help in solving a puzzle that was really doing my head in.
Rime Wirsing
Color me gone
Join date: 31 Dec 2008
Posts: 345
06-23-2009 18:53
Just to add a thank you to Argent for the response to my question.

Rime