Stop radio sound after objective

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Stop radio sound after objective

Post 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
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post 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
 
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post 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 .
Post Reply