snickersphilia Posted February 7, 2023 Share Posted February 7, 2023 integer listener; integer channel = 0; string msg = "69"; string soundName = "NICE Sound"; default { state_entry() { listener = llListen(channel,"69","69!",msg); } listen(integer channel, string msg, string soundName) { llPlaySound(soundName,1.0); } } Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 7, 2023 Share Posted February 7, 2023 45 minutes ago, snickersphilia said: listen(integer channel, string msg, string soundName) That's not what a listen event looks like. https://wiki.secondlife.com/wiki/Listen listen( integer channel, string name, key id, string message ){ ; } Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 7, 2023 Share Posted February 7, 2023 48 minutes ago, snickersphilia said: listener = llListen(channel,"69","69!",msg); And that's not what a llListen function call looks like either https://wiki.secondlife.com/wiki/LlListen llListen( integer channel, string name, key id, string msg ); Link to comment Share on other sites More sharing options...
snickersphilia Posted February 7, 2023 Author Share Posted February 7, 2023 still doesnt let me save 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 7, 2023 Share Posted February 7, 2023 That's because the script, as written, is not making sense. Basically, you are trying to make it listen for someone to type "69" on local chat (that is, in chat channel 0). So you want something that looks more like this... string soundName = "NICE Sound"; default { state_entry() { llListen(0," ", " ", "69"); } listen(integer channel, string name, key id, string msg) { llPlaySound(soundName,1.0); } } There are ways to improve that script significantly, but that's the basic idea. I really suggest that you read the wiki entries that I posted earlier to get a better feel for how the script works. Perhaps work through a beginning tutorial too. Try https://wiki.secondlife.com/wiki/Getting_started_with_LSL or any of the resources listed here... https://wiki.secondlife.com/wiki/LSL_Tutorial Link to comment Share on other sites More sharing options...
snickersphilia Posted February 7, 2023 Author Share Posted February 7, 2023 oh okay tysm! Link to comment Share on other sites More sharing options...
Love Zhaoying Posted February 7, 2023 Share Posted February 7, 2023 4 hours ago, snickersphilia said: still doesnt let me save FYI, when you get a "syntax error" or other error when compiling, the script DOES save. It just won't "run". 1 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