Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by C10110 · Mar 20, 2014 at 02:44 AM · triggersound

Trigger Sound to Play Globally Not on Triggered Object

Hello

I feel a little silly posting the same script here. But I'm lost trying to add multiple functionality to it I don't understand, and don't want to link people to the other post just to see the script.

So, I have this script:

 public class SoundOnTrigger : MonoBehaviour {
 
     public AudioCollection sounds;
 
     void OnTriggerEnter(Collider other) {
         if(other.tag != "Player") 
             return;
 
         if(this.audio != null) {
             sounds.PlayNext(this.audio);
         }
         else {
             sounds.PlayNext(other.audio);
         }
     }
 
 }
 

The problem with it is that it plays the sound on whatever object the trigger comes from. I need the sound to stay with the player and not sound like it's come from a 3D space. Think like a narrator in the scene. Or if the main character was talking at certain points while the player is triggering scripts. If the sound sounds like it's coming from a spot in the room the player can walk away from, it doesn't work. Games that are a great example of what I'm trying to do are Dear Esther and The Stanley Parable.

Thank you for your time! I understand everyone has a life! It means a lot even when I see this thread has views. Looking forward to any insight anyone has. Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by MousePods · Mar 20, 2014 at 02:48 AM

Uncheck 3D sound in the sound's options!

alt text

Hope this helps =]

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image C10110 · Mar 20, 2014 at 04:10 PM 0
Share

Yes thank you! Also I feel a little stupid having asked this in the first place! Sometimes I way over think things. I often forget how simple some things in Unity are. I also noticed if I reverse the distance in the rolloff settings it achieves what I am going for. Although I have yet to walk really far away from the trigger. However I think coupling that with unchecking 3D sound will be perfect. Thank you so much!

avatar image MousePods · Mar 20, 2014 at 04:14 PM 0
Share

No problem, I do the exact same thing! ^_^

Could you accept the answer xD?

avatar image C10110 · Mar 20, 2014 at 07:57 PM 0
Share

Again I feel so lame. How do you accept an answer? I apparently haven't been doing that here. :O Do I just click the little green check mark? If so I've done that....

avatar image MousePods · Mar 20, 2014 at 11:38 PM 0
Share

Yep, you did it, thanks! = ]

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Get an object to play a sound if player rolls over a trigger. 2 Answers

A node in a childnode? 1 Answer

How can i make when a sound trigger activates another dissapears ? 1 Answer

Sound On Collision Not Working 3 Answers

Making a sound play only once with a Boolean variable in javascript 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges