Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Audio Need help with audio

Discussion in 'Audio & Video' started by klabio9754, Oct 5, 2018.

  1. klabio9754

    klabio9754

    Joined:
    Jun 9, 2015
    Posts:
    1
    Hello! So I’m making a house and at a completely random point while exploring the house I want to have music start playing from upstairs. How can I do that? It’s not going to be like in resident evil 7 where these have all been scripted so when you go through a certain point it just start this ”event” or whatever, I want it to just start whenever and all of a sudden without doing anything myself to start it with the main character. Also I’m pretty new to everything so you might want to tell everything very simply so a dummy like me can understand :D Thanks in advance!
     
  2. Docaroo

    Docaroo

    Joined:
    Nov 7, 2017
    Posts:
    82
    Firstly you need a volume to keep track of whether the player is in the bottom floor of the house and use that as a first check.

    Then you can either trigger the music to play after a random time from when the player enters that volume ... or you could also have another volume that can randomly move around the house and when the player is in that volume the music will trigger.

    Personally I would use a random time after the player enters the house but it depends what you want to do...
     
  3. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    1,365
    That is good advice to use triggers.

    You could also do it like the Bayonetta 2 team. As the main character hits or enters a trigger, (that is in script, attached to the spooky audio sound track), and which is either located at the bottom of the stairs, or close to the enemy character, the music starts to play.
     
    Last edited: Jul 29, 2020
unityunity