The Daily Click ::. Forums ::. Klik Coding Help ::. Yo Zombies, Make Some Noise!
 

Post Reply  Post Oekaki 
 

Posted By Message

Jankster



Registered
  31/03/2005
Points
  1
31st March, 2005 at 18:55:22 -

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?

Thanks in advance.


 
n/a

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
31st March, 2005 at 19:13:43 -

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.

 
Image

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
31st March, 2005 at 21:41:17 -

I'm not people, I'm me.

 
n/a

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
1st April, 2005 at 05:46:36 -

Sorry, I meant Mr Radix helped me out.

 
Image
   

Post Reply



 



Advertisement

Worth A Click