Page 1 of 1

Ambientsound problem

Posted: Fri Jul 09, 2004 11:10 am
by Curgny
Lol, I got trouble again. I'm doing a map, where allies attack axis military facility. The problem is, I wan't to add those 2 sounds. My current code is

Code: Select all

level waittill spawn

wait 2

for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
{
$player[local.playernum] stufftext "tmstartloop sound/mechanics/Mec_Alarm_10.wav"
}

end
Now what I want is that sound/dialogue/m2l2/g/den_m2l2_258p.wav would start after the alarm and would start over and over with umm, 30 sec delay. I tried doing with thread but it didn't work :S

C.

Posted: Fri Jul 09, 2004 2:23 pm
by lizardkid
erm, can't you jsut use m2l2's ambient sound exec?

Posted: Fri Jul 09, 2004 2:50 pm
by Curgny
Umm, how? I can't script at all, I even used the .Map ambientsound tutorial :oops:

Posted: Fri Jul 09, 2004 3:08 pm
by lizardkid
well i haven't ever used it so i can't say that i know all it's sounds but do this. right after level waittill prespawn.


exec global/ambience.scr m2l2

:wink:

Posted: Fri Jul 09, 2004 5:48 pm
by Curgny
Nop :S
At least it didn't work for me

try

Posted: Fri Jul 09, 2004 8:26 pm
by tltrude
If you can add a script_origin named "test_speaker", this should work.

Code: Select all

main:

local.master = spawn ScriptMaster
local.master aliascache the_alarm sound/mechanics/Mec_Alarm_10.wav soundparms 1.0 0.2 0.9 0.2 2000 9000 auto loaded maps "m moh dm obj "
local.master aliascache the_voice sound/dialogue/m2l2/g/den_m2l2_258p.wav soundparms 1.0 0.2 0.9 0.2 2000 9000 auto loaded maps "m moh dm obj "

	level waittill prespawn

	level waittill spawn

	thread start_sound

end

start_sound:

	wait 1
	$test_speaker playsound the_alarm
	wait 17
	$test_speaker playsound the_voice
	wait 19
	goto start_sound

end