OsStopSound: Difference between revisions
From OpenSimulator
Jump to navigationJump to search
imported>Djphil Script fixed |
imported>Djphil m Remplace LINK_THIS by 1 |
||
| Line 34: | Line 34: | ||
if (power = !power) | if (power = !power) | ||
{ | { | ||
osLoopSound( | osLoopSound(1, soundName, 1.0); | ||
} | } | ||
else | else | ||
{ | { | ||
osStopSound( | osStopSound(1); | ||
} | } | ||
} | } | ||
Revision as of 11:08, 28 November 2020
osStopSound(integer linknum)
| |
| Stop the sound playing in the specified prim of a linkset. | |
| Threat Level | This function does not do a threat level check |
| Permissions | Use of this function is always allowed by default |
| Extra Delay | 0 seconds |
| Example(s) | |
//
// osStopSound Script Example
//
string soundName;
integer power;
default
{
state_entry()
{
// Get the first inventory sound name
soundName = llGetInventoryName(INVENTORY_SOUND, 0);
if (soundName == "")
{
llOwnerSay("Inventory sound missing ...");
}
else
{
llSay(PUBLIC_CHANNEL, "Touch to see osStopSound usage.");
}
}
touch_start(integer number)
{
if (power = !power)
{
osLoopSound(1, soundName, 1.0);
}
else
{
osStopSound(1);
}
}
}
| |
| Notes | |
| This function was added in 0.9.0.1 | |