Ni3ls
12th December 2013, 19:04
Hi how to play sounds after each other?
self PlaySoundAtLocation("MP_bomb_plant", self.origin, 1);
iprintlnbold("sound 1");
wait 1;
self PlaySoundAtLocation("MP_bomb_plant", self.origin, 1);
iprintlnbold("sound 2");
wait 1;
self PlaySoundAtLocation("MP_bomb_plant", self.origin, 1);
iprintlnbold("sound 3");
PlaySoundAtLocation(sound, location, iTime)
{
org = spawn("script_model", location);
wait 0.05;
org show();
org playSound(sound);
iprintlnbold("playsound");
wait iTime;
iprintlnbold("iWAIT");
org delete();
iprintlnbold("org delete");
iprintlnbold("Sound done");
return;
}
It only shows the sound 1 and after that, it shows playsound. The iWAIT isnt showing. So it doesnt play the rest of the sounds.
Even if i do
self playSound("MP_bomb_plant");
iprintlnbold("sound 1");
wait 1;
self playSound("MP_bomb_plant");
iprintlnbold("sound 2");
wait 1;
self playSound("MP_bomb_plant");
iprintlnbold("sound 3");
wait 1;
It only plays the first sound and the message sound 1
self PlaySoundAtLocation("MP_bomb_plant", self.origin, 1);
iprintlnbold("sound 1");
wait 1;
self PlaySoundAtLocation("MP_bomb_plant", self.origin, 1);
iprintlnbold("sound 2");
wait 1;
self PlaySoundAtLocation("MP_bomb_plant", self.origin, 1);
iprintlnbold("sound 3");
PlaySoundAtLocation(sound, location, iTime)
{
org = spawn("script_model", location);
wait 0.05;
org show();
org playSound(sound);
iprintlnbold("playsound");
wait iTime;
iprintlnbold("iWAIT");
org delete();
iprintlnbold("org delete");
iprintlnbold("Sound done");
return;
}
It only shows the sound 1 and after that, it shows playsound. The iWAIT isnt showing. So it doesnt play the rest of the sounds.
Even if i do
self playSound("MP_bomb_plant");
iprintlnbold("sound 1");
wait 1;
self playSound("MP_bomb_plant");
iprintlnbold("sound 2");
wait 1;
self playSound("MP_bomb_plant");
iprintlnbold("sound 3");
wait 1;
It only plays the first sound and the message sound 1