Page 1 of 1

Sound for all players?

Posted: Sat Feb 25, 2006 9:44 pm
by Waylander76
Hi all

How do I have an end of game message bradcast to all players in SH?
Something like 'Allies Win' or 'Axis Win' in CoD2?

It's for an OBJ map so if the objectives are destroyed or the allies kill all the axis the sound triggers or if the Axis kill all the allies or the times runs out it triggers saying 'Axis Win'.

I've tried the below with a $speaker playsound and it doesn't work and I've also put the aliases in an Ubersound.scr and still nothing.

local.master = spawn scriptMaster
local.master aliascache allies_win_snd sound/allies_win.wav soundparms 1.5 0.0 0.8 0.1 200 8000 auto loaded maps "dm obj"
local.master aliascache axis_win_snd sound/axis_win.wav soundparms 1.5 0.0 0.8 0.1 200 8000 auto loaded maps "dm obj"

What am I doing wrong?

Thanks in advance as always.

post

Posted: Sun Feb 26, 2006 1:07 am
by tltrude
Please post the victory threads--where it says "$speaker playsound allies_win_snd" and "$speaker playsound axis_win_snd".

Posted: Sun Feb 26, 2006 2:38 am
by Waylander76
Here they are.
Just the standard OBJ victory threads with my line added.
I've moved it up and down and still no joy.

Code: Select all

//*** --------------------------------------------

allies_win_thread:
	while(level.targets_destroyed < level.targets_to_destroy)
		waitframe
	
	teamwin allies
wait 2
$allies_win_speaker playsound allies_win_snd

end

//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------

axis_win_timer:

	level waittill axiswin
wait 2
$axis_win_speaker playsound axis_win_snd

end


wait

Posted: Sun Feb 26, 2006 10:59 am
by tltrude
Have you tried it this way?

Code: Select all

//*** -------------------------------------------- 

allies_win_thread: 
   while(level.targets_destroyed < level.targets_to_destroy) 
      waitframe 

$allies_win_speaker playsound allies_win_snd
wait 2 
 
teamwin allies

end 

//*** -------------------------------------------- 
//*** "Axis Victory" 
//*** -------------------------------------------- 

axis_win_timer: 

   level waittill axiswin

$axis_win_speaker playsound axis_win_snd 
wait 2

   teamwin axis

end 
I think the wait line should be below the sound line--to give it time to play before the game ends.

Posted: Sun Feb 26, 2006 5:27 pm
by Waylander76
Thanks Tom that works :)

The problem I have now is that the sound is only played from 1 centrally located speaker in the map,so depending where you are on the map the sound is either too loud or bearly audible.

I've tried adjusting the soundparms and the channel but i'm not getting it
so that the sound is 'even' depending on where players are on the map.

Are there any specific settings for the soundparms I can use so the sound
is played 'normally' or is there another way to do it?

Can i just use the playsound command without using a $peaker or does
it not work like that?

range

Posted: Mon Feb 27, 2006 2:41 am
by tltrude
The range of the sound is controled by these number.

alias m2l3_attack1 sound/dialogue/Generic/A/attack/dfr_attack_01k_2.wav soundparms 1.3 0.0 1.0 0.0 100 8000 dialog streamed subtitle "Open fire!" maps "m dm obj"

These two numbers mean the sound will be full volume for 100 units and fade away until 8000 units is reached, where it cuts off.

Posted: Mon Feb 27, 2006 2:26 pm
by Waylander76
Thanks Tom...will try it when i get in from work and let you know how it goes.

Posted: Wed Mar 01, 2006 6:31 pm
by Waylander76
Tom, did'nt get a chance to post yesterday, but i tested it and it works :)

Thanks again for all the help! :D