Page 1 of 1

Stop radio sound after objective

Posted: Mon Mar 07, 2005 5:35 pm
by mcunha98
Hi,

I use the scriptmaster to make a sound of radio for a trigger.
Well, this trigger is located above the objective, a radio of course, when the objective is completed, the sound dont stop.

How i stop the sound of trigger after complete the objective ?

Preparing sound...

Code: Select all

	local.master = spawn ScriptMaster
	local.master aliascache radio_snd sound/mechanics/Mec_RadioLoop_04.wav soundparms 0.5 0.0 1.0 0.0 256 256 auto loaded maps "dm moh obj train"
Playing sound...

Code: Select all

start_sounds:
  wait 1
  $radio_sound1 loopsound radio_snd
end
Objective thread

Code: Select all

bomb1_exploded local.bomb1:
 	while (local.bomb1.exploded != 1)
		 wait .1
	iprintlnbold "Allies have destroyed the Radio!"
end

Posted: Mon Mar 07, 2005 6:41 pm
by Green Beret
in the second part of your script,just add the line
$radio_sound1 stoploopsound radio_snd

Code: Select all

bomb1_exploded local.bomb1:
    while (local.bomb1.exploded != 1)
       wait .1
   $radio_sound1 stoploopsound radio_snd //add this
   iprintlnbold "Allies have destroyed the Radio!"
end
 

Posted: Tue Mar 08, 2005 3:54 am
by mcunha98
Green Beret wrote:in the second part of your script,just add the line
$radio_sound1 stoploopsound radio_snd
Thanks more one time !
I try use your code .