Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 DoverWolf101 · Jun 03, 2019 at 03:17 PM · audiotrigger

How do I add a trigger to an object so that the player walks over/through it and a audio clip plays then stops?

I am currently designing a demo 3D game and I'm trying to add in an audio clip into unity but I'm trying to have it so it doesn't play until the player walks over a specific object, is there a way this can be done and how would I do it because I also have nearly no experience with coding.

Comment
Add comment · Show 3
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 SaritaW · Jun 03, 2019 at 03:50 PM 0
Share

You may refer https://docs.unity3d.com/ScriptReference/$$anonymous$$onoBehaviour.OnTriggerEnter.html

avatar image DoverWolf101 SaritaW · Jun 03, 2019 at 03:54 PM 0
Share

Sorry but I have no idea what any of that means, I usually only do 3D modelling you see, I'm absolutely rubbish when it comes to animation or coding.

avatar image SaritaW · Jun 04, 2019 at 10:16 AM 0
Share

https://answers.unity.com/questions/408115/play-audio-sources-in-trigger-zone-when-player-ent.html refer this similar question asked by another user. Chronos-L has also explained his answer.This might help. I would suggest you to watch some online tutorials which will give you an idea about trigger enter.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by tormentoarmagedoom · Jun 03, 2019 at 04:03 PM

Hello Dover.

For your questiona nd your comment, i only can say this:

We are not teachers, we are not free code providers. Ee will not teach you how to code... You need to learn, you ened to start from the beggining. Here, we solve specific problems with specific answers.

So learn about, Basic code, Colliders, Rigidbody, OntriggerEnter, AudioSource, AudioClip...

Bye.

Comment
Add comment · Show 2 · 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 DoverWolf101 · Jun 04, 2019 at 09:42 AM -1
Share

Firstly no need to be rude about it, I'm a college student and I am learning this kind of stuff but to learn everything within 2 weeks is impossible for what I do. I didn't ask for anyone to give me the code or to $$anonymous$$ch me anything, I asked for guidance on how to do a specific thing of which is titled above so next maybe ask to understand someone's situation before you say anything.

avatar image tormentoarmagedoom DoverWolf101 · Jun 05, 2019 at 04:03 PM 0
Share

I was not pretending to be rude. This is the official Unity forum for ask about methods, functions and issues related to Unity. If you don't know what OnTriggerEnter is, means you need to learn a lot of basic things.

If your question can eb answered by reading the Officcial Unity $$anonymous$$anuals, means is not a good question.

And for your info, i told you what you need to learn to solve your problem:

Basic code, Colliders, Rigidbody, OntriggerEnter, AudioSource, AudioClip

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

157 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

how do i play a sound if i press a particular key? 2 Answers

Play AudioClip on trigger with First Person Controller 1 Answer

Audio Trigger 3 Answers

Problem with streaming audio and play in trigger area 0 Answers

How do I keep background music playing when I enter another level 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