Despite all of the wonderful help here in the forum, as a new person to scripting I have been unable to find a command to help me with my script.
I'm trying to write a script to play a sound when ANOTHER avatar collides with a prim. But I don't want it to play when MY avatar collides with it. But, I cant figure how to do it, If anyone has an idea how to help I would be most grateful.
This is what I have so far.
string Start_Event = "sound1";
string Stop_Event = "sound2";
string Cont = "sound3";
default
{
state_entry()
{
llVolumeDetect(TRUE);//So you can walk thru it
llSay(0, "Hello, Avatar!"
;//to help test}
touch_start(integer total_number)
{
llSay(0, "Touched."
;//to help test}
collision_start(integer num_detected) {
llPlaySound(Start_Event, 1.0);
llSleep(1.0); //for a pause
llLoopSound(Cont, 1.0); //same volume info as above
}
collision_end(integer num_detected) {
llStopSound();//to stop the loop sound when collisions over
llSleep(3.0);// a gap before the final sound
llPlaySound(Stop_Event, 0.2);
}
}
Many thanks in hope.
Regards
Katelyn