[SOLVED]How to stop a sound?
Posted: Wed May 27, 2015 7:46 pm
For example, I have a sound that's going to be activating within a map using the ThingSound ACS command. How would I be able to cut the sound off?
So far removing the mapspot the sound is being spawned from doesn't work, and creating a decorate item that triggers the sound and removing that doesn't work either.
Solved:
[spoiler][/spoiler]
So far removing the mapspot the sound is being spawned from doesn't work, and creating a decorate item that triggers the sound and removing that doesn't work either.
Solved:
[spoiler]
Code: Select all
Actor Musicsound
{
-NOGRAVITY
reactiontime 999
states
{
spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundex ("Music", CHAN_VOICE, 9.0, 0)
goto butloop
butloop:
TNT1 A 35
TNT1 A 0 A_JumpIf (ACS_ExecuteWithResult(20), "cutoff")
TNT1 A 0 A_CountDown
loop
cutoff:
TNT1 AA 0 A_Stopsoundex("Voice")
Death:
TNT1 A 0
stop
}
}
//////
Script 20 (void)
{
{
If(!Situation()) {
SetResultValue(FALSE);
} else {
SetResultValue(TRUE);
}
}
}