Using the Direct Sound plug in, let’s say I have a zombie that groans louder the closer I get to it. That’s pretty easy. Now I want multiple copies of that same zombie in the play area, this is where I need some help. When I place more than one in the play area the game mysteriously chooses only one of the zombies to groan, leaving its clones dead silent.
So my question is, how can I make more than one of the same object emit sound simultaneously? And while you’re here, how do you get a sound to loop?
Heh, I had the exact same problem a while ago, and people here helped me out.
Anyway, here's what I did:
First you gotta start a fastloop for the amount of zombies, and how ever often you want a moan, so:
Every 1 second -> Start Loop "Moan" x 'Number of Zombies' so it loops depending on the number of zombies.
Then we want to make it so on every loop a random zombie in the play area is chosen, so it'd be
On loop "Moan"
+Pick 'Zombie' at random -> Set Listener to 'Player' + Autoplay "Zombie-Moan.wav" at position (relative to)'Zombie'
I think I wrote it right, you'll have to try it if you can understand my shitty explaination. You can also add a few Random Number events to randomize it a bit.