Vera Gavilan Posted March 18, 2012 Share Posted March 18, 2012 I have zero knowledge of scripting. With help from tutorials I managed to make running water for a faucet, touching on/off. Now I want to put a sound in it. The sound should play looped as long as the faucet is running.How and where to put the UUID and the sound, please help :) The water on/off script:integer on = TRUE;default{ touch_start(integer iNum) { if (!on) llMessageLinked(LINK_SET, 0, "on", NULL_KEY); else llMessageLinked(LINK_SET, 0, "off", NULL_KEY); on = !on; }} Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted March 18, 2012 Share Posted March 18, 2012 integer on = TRUE;string sound = ""; //UUID or the name go heredefault{ touch_start(integer iNum) { if (!on) { llMessageLinked(LINK_SET, 0, "on", NULL_KEY); llLoopSound(sound, 1.0); } else { llMessageLinked(LINK_SET, 0, "off", NULL_KEY); llStopSound(); } on = !on; }} Link to comment Share on other sites More sharing options...
Vera Gavilan Posted March 18, 2012 Author Share Posted March 18, 2012 Ty for quick reply. Okay the script accepted the UUID and there were no errors. However there's a script error when turning the faucet on. Tthe prim can't find the sound. I put it in the prim contents next to script. Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted March 18, 2012 Share Posted March 18, 2012 The sond doesn't have to be in the object if you use the UUID. If you put the script in the prim, you can as well use the name of the sound. 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