llShout
|
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
02-18-2008 07:25
Some time ago I made a script to turn on and off an object. The object responds to the words 'on' and 'off' on channel 7. The script used the shout command in the form:- llShout(7,"on"  ; The script was working fine, but then at some unspecified time in the recent past, it stopped working. I have tested it, and find that if I shout in chat "/7 on" the object works. If the script shouts, the object doesn't work. I wonder whether something has been changed in LSL to account for this, because I am baffled. Mind you, when scripting is concerned, it doesn't take much to baffle me. 
|
|
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
|
02-18-2008 07:43
Could it be, that the object containing the script is too far away from the object which should be listening?
One thing you could try is use llRegionSay() instead of llShout()
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
02-18-2008 08:23
Also, make sure the scripts are still running. They may have had script errors (e.g., stack-heap collisions). Open the object contents & open the script, and check the "running" box at the bottom. If it's unchecked, most likely it got a script error when you weren't around to see it.
|
|
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
|
02-18-2008 10:56
If the object its so far away maybe you can use llRegionSay to get work
|
|
British Knight
Registered User
Join date: 15 Apr 2006
Posts: 4
|
02-18-2008 11:05
Clutching at straws here, but remember an object cannot hear itself, even if it does shout very loud.
|
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
02-19-2008 08:19
Ok, thanks for the suggestions. The scripts *are* definitely running, I have set the calling script so that it shouts the command on channel 0 as well as 7. The script in the object, although I cannot see it, responds to the command shouted on channel 0.
The objects are not too far away; they respond to my shouts when I am standing in the same position as the calling object, and indeed some of them are only about 4m away.
And they are definitely different objects.
I am baffled by the whole thing, but would appreciate any other suggestions. In the meantime I will try llRegionSay
|
|
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
|
02-19-2008 09:29
then the lllisten on channel 7 must have an additional nonsensical filter that the lllisten on channel 0 does not have.
if (a=b) != if (a==b)
or you remove the listen too early somewhere.
|
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
02-20-2008 13:21
Sorry, I am not being at all clear, I'm afraid. My apologies. There are no listens in my script. The script with the listens belongs to the commercial object. This is working correctly, in the sense that if I shout '/7 on' in the chat window, the device turns on. However, when the script shouts 'on' on channel 7, nothing happens. Now this script *was* working, without any problems. And then some time ago it stopped working, and I cannot work out why. The relevant coding is as follows:- switch() { llSay(0,"New instance of switch"  ; llSay(0,"In switch raining = "+(string)raining); if (raining==1) { raining=0; llShout(7,"off"  ; llSay(0,"off"  ; } else { raining=1; llShout(7,"on"  ; llSay(0,"on"  ; } llSay(0,"In switch new raining = "+(string)raining); Now in the 'else' clause, the script shouts 'on' on channel 0 at that point. So I am pretty sure it is doing the shout correctly on channel 7. But the object no longer responds to the script. Has something changed in LSL recently that would cause this coding to fail? PS: I have changed all the llShouts to RegionSay in the form llRegionSay(7,"on"  , and it is still not working.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
02-20-2008 14:43
at first I'd suspect the listen is filtered by owner, and thus ignores owners objects (or any other objects....
but you say it DID work before....
which leads me to believe something about the previous one is different than the current one....
likely suspects that could be filtered owner ( created by an alt? deeded to a group...) creator ( this would be weird but not impossible in some cases ) group ( changed from previous ) spelling ( an extra space, different capitalization... ) colocation( prims cannot hear themselves, the scripts should be in different prims )
that's all that comes to mind offhand
_____________________
| | . "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... | - 
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
02-21-2008 06:44
I had the same suspicion, about the object filtering.
Have you made any ownership changes in either object, such as deeding to group? If not, have you changed the group of either object?
|