# UE trigger boxes for music transitions

**URL:** https://qa.fmod.com/t/ue-trigger-boxes-for-music-transitions/16914
**Category:** Unreal Engine
**Created:** [March 20, 2021, 9:44pm UTC](https://qa.fmod.com/t/ue-trigger-boxes-for-music-transitions/16914 "2021-03-20T21:44:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![theVonZipper](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@theVonZipper](https://qa.fmod.com/u/theVonZipper)
#### Post date: [March 20, 2021, 9:44pm UTC](https://qa.fmod.com/t/ue-trigger-boxes-for-music-transitions/16914/1 "2021-03-20T21:44:53Z")

</div>

I’m attempting to set up a system within UE that will start playing one piece of music when you pass through a trigger box and stop another. I’ve tried using one trigger box BP for entering a dungeon which works, but I cannot figure a way to set up an exit trigger box BP to stop the dungeon music on exit.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/6/6c338a899ac79cde41c3279590c7ab068dc4c542.png) ![ExitDungeon](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/4/414f34823e2fb1454eb5a596fa94a8a5b7485134.png)

How do I tell the Event Instance Stop node what FMOD audio event I want it to stop?

Thanks

---

<div class="post-metadata">

### Author: ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)
#### Post date: [March 20, 2021, 10:13pm UTC](https://qa.fmod.com/t/ue-trigger-boxes-for-music-transitions/16914/2 "2021-03-20T22:13:58Z")

</div>

You don’t want to stop an event, you want to stop an event instance, so you have to retrieve that instance.  
I’m not a UE user (yet), but from what I find, you should use the “return value” of “play event 2D” and connect it to “event instance” of “event instance stop” (the play event 2D node returns the played instance).

---

<div class="post-metadata">

### Author: ![theVonZipper](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@theVonZipper](https://qa.fmod.com/u/theVonZipper)
#### Post date: [March 20, 2021, 11:22pm UTC](https://qa.fmod.com/t/ue-trigger-boxes-for-music-transitions/16914/3 "2021-03-20T23:22:31Z")

</div>

Thanks Alcibiade. I’ve also tried this. I think it’s what you mean … but even with Auto Play unchecked the dungeon music doesn’t stop. In fact a new instance begins playing over the one I triggered on my way into the dungeon when exiting through Enter\_Dungeon BP again. I need to find some way for the BP to know if the music is already playing and if it is, either ignore it or stop it.

 ![ExitDungeon_2](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/0/0a523294f548f7884c3f3f75c7a28e13785226a9.png)

---

<div class="post-metadata">

### Author: ![theVonZipper](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@theVonZipper](https://qa.fmod.com/u/theVonZipper)
#### Post date: [March 20, 2021, 11:34pm UTC](https://qa.fmod.com/t/ue-trigger-boxes-for-music-transitions/16914/4 "2021-03-20T23:34:12Z")

</div>

Just to be clear I’m using two Trigger Box BP’s at the entrance to the dungeon. On the exterior I’ve placed Exit\_Dungeon and on the interior I’ve placed Enter\_Dungeon. My thought is, from the exterior you would 1st pass through Exit\_Dungeon where there would be no effect on the audio because it isn’t playing yet. Then once you pass through Enter\_Dungeon the music starts to play. Reversing the path doesn’t work though.

---

<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: [March 29, 2021, 12:23am UTC](https://qa.fmod.com/t/ue-trigger-boxes-for-music-transitions/16914/5 "2021-03-29T00:23:35Z")

</div>

As mentioned, you need to grab the reference to the music event instance before you can stop it. You can use the Find Event Instances blueprint to find the dungeon music event before passing it onto the Event Instance Stop blueprint.

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