Malix Orfan Posted February 19, 2013 Share Posted February 19, 2013 hello can anyone help? this is an easy one I know! I have two scripts. one says something on channel ), one listens. Now, it works when I say the magic word in chat, but not when the script says it!default{ state_entry() { llSetTimerEvent(10); } timer() { llSay(0,"plus"); }} and the listener is:default{ state_entry() { llListen(0, "", NULL_KEY, "" ); } listen( integer channel, string name, key id, string message ) { if ( message == "plus" ) { llWhisper( 0, "more!" ); } }} what am I doing wrong?(yes I know its a basic question, couldn't find anything in any docs!thanks! Link to comment Share on other sites More sharing options...
Helium Loon Posted February 19, 2013 Share Posted February 19, 2013 Are the scripts in the same object? As I recall, objects cannot hear themselves (to prevent recursion problems). 1 Link to comment Share on other sites More sharing options...
Malix Orfan Posted February 19, 2013 Author Share Posted February 19, 2013 okies I think that's it. thanks and +1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 19, 2013 Share Posted February 19, 2013 Aside from the technical issue, you're also listening on the public chat chanel and (more than that) not closing the listener when you are done with it. That's a bad practice to get into, because it leads to chat lag for everyone in the area. Link to comment Share on other sites More sharing options...
Ela Talaj Posted February 20, 2013 Share Posted February 20, 2013 Can't imagine why you would need a scriptset like that, but if you do, here's a way to do it: default{ state_entry() { llSetTimerEvent(10); } timer() { llMessageLinked(LINK_SET, 1, "", NULL_KEY) }}and the "listener" is:default{ link_message(integer src, integer num, string str, key id) { if(num) { llWhisper( 0, "more!" ); } }} Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now