11-24-2005 07:43
This function is supposed to stop the currently playing sound of an object. Wiki says it will work on sounds started with llPlaySound.

It seems to be broken, though it does still work on llLoopSound.

CODE
default
{
state_entry()
{
llPreloadSound("Spin");
state stop;
}
}

state stop
{
state_entry()
{
llOwnerSay("Stopped");
llStopSound();
}
touch_start(integer num)
{
state play;
}
}

state play
{
state_entry()
{
llOwnerSay("Play");
llPlaySound("Spin",1);
}
touch_start(integer num)
{
state stop;
}
}