Scripts
Sound Scripts
//This script will play the sound one time when touched
//Replace the UUID with the one chatted to you in-world by the wizard script
key soundUUID = "f26362e4-962d-ee95-a089-1b353b6d4824";
default
{
touch_start(integer total_number)
{
llPlaySound(soundUUID , 1.0);
}
}
//This script will toggle the sound on or off when touched
key soundUUID = "f26362e4-962d-ee95-a089-1b353b6d4824";
integer running = 0;
default
{
touch_start(integer total_number)
{
if(running == 0){
llLoopSound(soundUUID, 1.0);
running = 1;
}else{
llStopSound();
running = 0;
}
}
}
// This script will turn sound on and off by using chat commands
// Examples:
// /5 play
// /5 stop
//Change the listenChannel to whatever channel you like
key soundUUID = "f26362e4-962d-ee95-a089-1b353b6d4824";
integer listenChannel = 5;
default
{
state_entry()
{
llListen(listenChannel,"",llGetOwner(),"");
}
listen(integer channel, string name, key id, string message){
if (message == "play"){
llLoopSound(soundUUID, 1.0);
}else if(message == "stop"){
llStopSound();
}
}
}
Water Scripts
This is a basic water flow script. Just create a new script in your water piece and overwrite any code inside with this.
//basic water script
float speed = 0.1;
//change the number above to change the speed
default
{
touch_start(integer total_number){
if(llDetectedKey(0) == llGetOwner()){
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0.0, 0.0, speed);
}
}
}
**note - change rotation of texture for different flow! Try 90 degrees, or 180.
