Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Audio Need help with audio

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

  1. klabio9754


    Jun 9, 2015
    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


    Nov 7, 2017
    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


    Aug 4, 2013
    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