PDA

View Full Version : play Multiple sounds



Ni3ls
12th December 2013, 20: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

Ni3ls
13th December 2013, 08:45
fixed .

kung foo man
13th December 2013, 10:55
Just tell your fix for others.

Ni3ls
13th December 2013, 11:32
Mistake in loop function. Needed to remove an endon