Search Unity

Question How can I make 10 monsters scream one

Discussion in 'Audio & Video' started by mfatihbarut, May 20, 2021.

  1. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    Hi all,
    There are 10 monsters in the scene.
    They all scream when they hit something.
    But that is annoying.
    Therefore I want audio mixer to ignore others and just sound one.
    How can I do it?
     
  2. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
  3. The built-in audio capabilities are rather basic. I don't think it is possible out of the box. You either can do it yourself (count how many voices you started) or use a more advanced tool like FMOD or Wwise or some assets.
     
  4. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    Maybe use 3D sound. Limit the area where each monsters sound reaches. So if the camera is near a monster, only then would you hear that scream. This is assuming its a 3D scene.

    Can you tell us more about the scene.
     
  5. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    I have only 1 fixed camera
     
  6. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    it kinda looks complicated to me. I would prefer a simpler code base approach.
     
  7. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,304
    This is why an audio manager is useful. Because everything is centralized, and it can make these decisions because it knows everything that is playing, and it can accept or reject requests.
     
  8. arthurmoore

    arthurmoore

    Joined:
    May 28, 2021
    Posts:
    1
    Hello mfatihbarut,

    I think The built-in audio capabilities are rather basic.It may be possible to do it yourself (count the number of voices you began with) or by using 3D sound. Your monster's sounds should only reach a specific area. If you were to watch the camera while a monster is close by, you would hear the scream. We assume this is a 3-D scene.

    Thank You.
     
  9. Inxentas

    Inxentas

    Joined:
    Jan 15, 2020
    Posts:
    278
    A simple way to do this is to simply decouple the audio from the thing that causes it, and have the thing that causes it request a sound being played from another thing. And then have this other thing check whether or not a certain clip is playing and only play it, when it is not.

    That being said, good audio design a rather complicated subject. In my (limited) experience the Mixer is a great tool to have different channels and such, but it still requires you to actually design your soundscape. 3D sounds are a way to affect volume at range, but if you have 10 of those enemies wailing on you in melee combat you're still going to end up with overlapping screams.

    I'd ask yourself: is this audio just immersive embellishment, or does it consist of informative audio queues? Whatever solution you pick, design your sound arround it's actual purpose.
     
  10. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    I just use 1/10 randomness to save the day.