# How to prioritize events

**URL:** <https://qa.fmod.com/t/how-to-prioritize-events/15617>\
**Category:** Unity\
**Created:** [April 7, 2020, 12:49pm UTC](https://qa.fmod.com/t/how-to-prioritize-events/15617 "2020-04-07T12:49:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shmank](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@Shmank](https://qa.fmod.com/u/Shmank)\
**Post date:** [April 7, 2020, 12:49pm UTC](https://qa.fmod.com/t/how-to-prioritize-events/15617/1 "2020-04-07T12:49:23Z")

</div>

Hello there! I’m new to FMOD. So i’m wondering, is there any way to prioritize multiple diffrient events like you can do it with number of instances of one particular event? My goal is to load events when player gets closer to them and unload them when player leaves the area, so i don’t need to launch all of events on start of the scene. Can i do it in case of using Unity but without a code?

Thanks!

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [April 9, 2020, 5:26am UTC](https://qa.fmod.com/t/how-to-prioritize-events/15617/2 "2020-04-09T05:26:11Z")

</div>

What you are describing is not prioritizing but controlling when events get created and destroyed. You can achieve this by setting up a trigger/collider zone in your Unity project and setting the FMOD event emitter to start when trigger/collider enter condition is met (your trigger zone) and destroy when exiting the trigger/collider.

[https://fmod.com/resources/documentation-unity?version=2.0&page=game-components.html#trigger-conditions](https://fmod.com/resources/documentation-unity?version=2.0&page=game-components.html#trigger-conditions)

---

<div class="post-metadata">

**Author:** ![Shmank](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@Shmank](https://qa.fmod.com/u/Shmank)\
**Post date:** [April 10, 2020, 10:51am UTC](https://qa.fmod.com/t/how-to-prioritize-events/15617/3 "2020-04-10T10:51:54Z")

</div>

Hello Richard! I think it’s not quite right. I need object to be heard before player collide or enter it.

---

<div class="post-metadata">

**Author:** ![Paalo](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/paalo/32/616_2.png) [@Paalo](https://qa.fmod.com/u/Paalo)\
**Post date:** [May 24, 2020, 5:28am UTC](https://qa.fmod.com/t/how-to-prioritize-events/15617/4 "2020-05-24T05:28:57Z")

</div>

@Shmank add a separate Circle/Sphere Collider for your `StudioEventEmitter`, set it to `Is Trigger = true` and make it as big as the sound size that your Event has (eg. `Radius = 20f`).

Then on the `StudioEventEmitter` you can (as @richard_simms mentioned) set the FMOD event to start playing in `OnTriggerEnter` and stop playing in `OnTriggerExit`.

![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/4/483e4615eefec6f4b207abf56471638799eba859.png)

---

<div class="post-metadata">

**Author:** ![Shmank](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@Shmank](https://qa.fmod.com/u/Shmank)\
**Post date:** [May 24, 2020, 8:16am UTC](https://qa.fmod.com/t/how-to-prioritize-events/15617/5 "2020-05-24T08:16:41Z")

</div>

Aaaand it works perfectly! Thank you very much, you helped me a lot!

---

<div class="post-metadata">

**Author:** ![Paalo](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/paalo/32/616_2.png) [@Paalo](https://qa.fmod.com/u/Paalo)\
**Post date:** [May 24, 2020, 1:27pm UTC](https://qa.fmod.com/t/how-to-prioritize-events/15617/6 "2020-05-24T13:27:34Z")

</div>

Happy to help! 🙂
