custom sounds
Posted: September 30th, 2005, 1:25 am
I'd like to add custom sounds so that when u hit a trigger the sound starts..i tried the tut for sound effects, and that didnt work, but its not what i'm looking for anyway... leveller showed me a test map and if u fall down a pit or whatever u hear a sound, and thats the kind of thing i want. i looked at his scripts but its some what different to the tuts, and i cant figure it out without the .map....i cant get hold of him, so i thought i'd ask how it works here
this is his sound script(he put his transporter code here too for some reason)

this is his sound script(he put his transporter code here too for some reason)
Code: Select all
main()
{
thread message1();
thread message2();
thread message3();
thread message4();
thread transporter();
}
message1()
{
messagetrig = getent ("die_human","targetname");
messagetrig waittill ("trigger");
alert = getent ("sound1", "targetname");
alert playsound("die");
wait (3);
thread message1();
}
message2()
{
messagetrig = getent ("die_human01","targetname");
messagetrig waittill ("trigger");
alert = getent ("sound01", "targetname");
alert playsound("die");
wait (3);
thread message2();
}
//message2()
//{
//messagetrig = getent ("duke_nukem_trigger","targetname");
//messagetrig waittill ("trigger");
//alert = getent ("duke_nukem", "targetname");
//alert playsound("duke_nukem_");
//wait (3);
//thread message2();
//}
message3()
{
play_intro = getent ("intro", "targetname");
play_intro playloopsound("intro_");
}
message4()
{
messagetrig = getent ("trigger03","targetname");
messagetrig waittill ("trigger");
alert = getent ("sl", "targetname");
alert playsound("slv");
wait (3);
thread message4();
}
transporter()
{
trig01 = getent ("transporter01","targetname");
trig01 waittill ("trigger");
transptr_plt01 = getent ("transporter_plate01", "targetname");
transptr_plt02 = getent ("transporter_plate02", "targetname");
wait 1;
transptr_plt01 movez (1424, 0.001);
transptr_plt01 waittill ("movedone");
transptr_plt02 movez (-1338, 0.001);
transptr_plt02 waittill ("movedone");
transptr_plt01 movey (72, 0.001);
transptr_plt01 waittill ("movedone");
transptr_plt02 movey (-72, 0.001);
transptr_plt02 waittill ("movedone");
transptr_plt01 movez (-88, 0.001);
transptr_plt01 waittill ("movedone");
transptr_plt02 movez (2, 0.001);
transptr_plt02 waittill ("movedone");
trig01 waittill ("trigger");
transptr_plt01 = getent ("transporter_plate01", "targetname");
transptr_plt02 = getent ("transporter_plate02", "targetname");
wait 1;
transptr_plt02 movez (1424, 0.001);
transptr_plt02 waittill ("movedone");
transptr_plt01 movez (-1338, 0.001);
transptr_plt01 waittill ("movedone");
transptr_plt02 movey (72, 0.001);
transptr_plt02 waittill ("movedone");
transptr_plt01 movey (-72, 0.001);
transptr_plt01 waittill ("movedone");
transptr_plt02 movez (-88, 0.001);
transptr_plt02 waittill ("movedone");
transptr_plt01 movez (2, 0.001);
transptr_plt01 waittill ("movedone");
thread transporter();
}