Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Please Help music script needed

Isabella Trezuguet
Registered User
Join date: 29 Dec 2008
Posts: 7
02-16-2009 10:53
im not good at scripting or anything infact i dont know anything about it lol
but i need a script that when u touch the object a sound loops and when you touch the object again the sound stops
i have managed to modify a script to get touch and play once or touch and loop but not touch start/loop touch stop...
please help! ive been looking in the forum and cannot find this
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
02-16-2009 11:02
Try something like this......


CODE

default
{
touch_start(integer num_detected)
{
llLoopSound("Put the name of your sound file between the quotes here",1);
state playsound;
}
}
state playsound
{
touch_start(integer num_detected)
{
llStopSound();
state default;
}
}


Just be sure that you put the script AND a copy of the sound file in the object that is supposed to play the sound. (Or you could just put the UUID of the sound file between the quotes above.)
Isabella Trezuguet
Registered User
Join date: 29 Dec 2008
Posts: 7
02-16-2009 11:15
Thank yo very much :))))
Ebenezer Yoshikawa
Registered User
Join date: 1 Jul 2008
Posts: 7
04-06-2009 15:14
Ahh the wonders of search button. Thanks a lot friend. Been looking for such script for a while indeed.