It won't listen to me!
|
|
Yrrek Gran
Crackpot Inventor
Join date: 20 Oct 2006
Posts: 209
|
03-16-2007 12:28
For the life of me, i can not get llListen to hear llSay from another script. i.e. default { state_entry() { llSay(5511,"stop"  ; llSleep(10); llSay(5511,"go"  ; llSleep(10); llResetScript(); } } from the chat bar, /5511 stop and /5511 go, work just fine. Both scripts are in the same prim. Why would it work with chat and not from this script? What am I missing?
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
03-16-2007 12:38
From: Yrrek Gran Both scripts are in the same prim Objects can't hear their own chat messages - use llMessageLinked to talk between scripts in the same object..
|
|
Yrrek Gran
Crackpot Inventor
Join date: 20 Oct 2006
Posts: 209
|
03-16-2007 12:57
THANKS!
I didn't know that.
I only discover a few hundred things I didn't know about SL every day!
Off to fix it!
TY again.
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
03-16-2007 13:08
If they could hear themselves, all scripts that listened and talked would have to check that they weren't hearing themselves - if they didn't do this check, you'd get scripts losing their minds and getting stuck in feedback loops... Glad I could help (and several others did in your other thread - I just made it to this one first  ).
|
|
Yrrek Gran
Crackpot Inventor
Join date: 20 Oct 2006
Posts: 209
|
03-16-2007 14:18
"losing their minds and getting stuck in feedback loops..."
That seems to be what is happening to me since I started SL.
Yes they did say, llMessageLinked, but I was in the wrong forum and got yelled at, LOL, (not really), stupid browser tabs!
Your concise reply, "Objects can't hear their own chat messages" helped me a lot. There many obscure things to learn in SL, and I appreciate everyone that has helped me, in BOTH forums.
When you learn the reason WHY things do not work the way you expect, it becomes a learning experience.
I just moved the script to another prim and it worked perfectly.
|
|
Yrrek Gran
Crackpot Inventor
Join date: 20 Oct 2006
Posts: 209
|
03-16-2007 18:44
BTW Don't try llScream(5511,"go"  ; it didn't work either, hehe!
|
|
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
|
03-16-2007 19:10
for what it's worth.. llMessageLinked() and link_message() {} seem to be more efficient than llListen()'s. For communicating between prims on a linked object (or on a single prim) they're definitely the way to go! =)
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources. Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas. - Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
03-16-2007 19:26
Agreed...if you're going to have messages traveling through the same object, you should really use llMessageLinked(). Not only is it faster than an llListen, it's also more secure.
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|
|
Yrrek Gran
Crackpot Inventor
Join date: 20 Oct 2006
Posts: 209
|
03-16-2007 20:57
To clarify things, as I am doing a build, I experiment with possible animations first. Although I am still learning LSL, the quick and dirty way to script, to achieve my desired effect is the first and foremost objective. If in fact, I am on the right track and what I expect to see from my animation is achieved, next, but not always, I look for the proper and most effective way to optimize my script. I first started off with millions of timers. I couldn't figure out why I couldn't walk across the room anymore. As I learn about LSL I fumbled my way into more efficient scripting. I care about creating lag, and want to do my part in preventing as much as possible and not introduce any more that necessary. To a somewhat novice, and totally confused woman, I have to admit, things that are obvious to the 'enlightened' are not so to some of the rest of us. That simple "Objects can't hear their own chat messages" from Meade was like a bolt from the blue! I don't remember EVER reading that in LSLWiki. I learned programming by 'Trial and error', am used to the old Flow Chart system, and find myself totally buried in {{  help me }}'s I realize it is not your job to "Set one straight" so to speak, but a brief explanation is like a gold mine to me. When I got my first 'Prim hair' I wore a bald wig underneath. Since then, because of all of the hair I have pulled out learning LSL, I don't need it anymore! hehe! Thank ALL of you for you input
|
|
Gaius Goodliffe
Dreamsmith
Join date: 15 Jan 2006
Posts: 116
|
03-16-2007 21:35
From: Kenn Nilsson Agreed...if you're going to have messages traveling through the same object, you should really use llMessageLinked(). Not only is it faster than an llListen, it's also more secure. Warning! Warning! Danger Will Robinson! Danger! Danger! Sometimes it might be more secure. Depends on what you're doing, where you're doing it, and what you're trying to accomplish. There are cases where it is more secure, and cases where it isn't. Depends entirely on what information you're trying to hide, and from whom. Do note that if your object has modify permissions, and someone wants to see what link messages are being passed around inside, they need only drop in a script of their own to view them. I've done this in objects I wanted to alter the behavior of, but all the scripts were no-modify. Could still do what I wanted by sending the right link messages, after decoding the inter-script communications. (Sorry, whenever I see the word "secure" used in a generalization, huge alarms go off in my head. All generalizations are false, and false beliefs about security can be disastrous.)
|
|
Yrrek Gran
Crackpot Inventor
Join date: 20 Oct 2006
Posts: 209
|
Here it is, my bird.
03-18-2007 08:32
Just when I was about to give up, I finally got my animation working. Thanks to all for your help. Maybe someday, I will get past the "Hello Avatar" stage of LSL. The final product is a soaring / flapping buzzard. I just have the test version about completed, but am having a dickens of a time getting control of the 'little bugger'. Once I can work out the controls, maybe I can sell it. You can view it here: http://www.youtube.com/watch?v=D9dYu5WwOv0Comments are welcome. Thanks again,
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
03-18-2007 12:27
From: Gaius Goodliffe (Sorry, whenever I see the word "secure" used in a generalization, huge alarms go off in my head. All generalizations are false, and false beliefs about security can be disastrous.)
Yes, sorry. I should have been more specific... ...I was meaning secure as in no chance of 'cross-talking' with other scripts in the area that may be using listens and llSays.
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|