Post your scripting questions / solutions here
Moderator: Moderators
Curgny
Corporal
Posts: 30 Joined: Mon Jul 21, 2003 9:12 am
Post
by Curgny » Fri Jul 09, 2004 11:10 am
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.
lizardkid
Windows Zealot
Posts: 3672 Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT
Post
by lizardkid » Fri Jul 09, 2004 2:23 pm
erm, can't you jsut use m2l2's ambient sound exec?
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
Curgny
Corporal
Posts: 30 Joined: Mon Jul 21, 2003 9:12 am
Post
by Curgny » Fri Jul 09, 2004 2:50 pm
Umm, how? I can't script at all, I even used the .Map ambientsound tutorial
lizardkid
Windows Zealot
Posts: 3672 Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT
Post
by lizardkid » Fri Jul 09, 2004 3:08 pm
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
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
Curgny
Corporal
Posts: 30 Joined: Mon Jul 21, 2003 9:12 am
Post
by Curgny » Fri Jul 09, 2004 5:48 pm
Nop :S
At least it didn't work for me
tltrude
Chuck Norris
Posts: 4774 Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:
Post
by tltrude » Fri Jul 09, 2004 8:26 pm
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
Tom Trude,