- Home /
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.
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.
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.
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.
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.
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