# Deactivating a damage oneshot when the death oneshot plays

**URL:** <https://qa.fmod.com/t/deactivating-a-damage-oneshot-when-the-death-oneshot-plays/15585>\
**Category:** Unity\
**Created:** [March 29, 2020, 7:05pm UTC](https://qa.fmod.com/t/deactivating-a-damage-oneshot-when-the-death-oneshot-plays/15585 "2020-03-29T19:05:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaraDB](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@DaraDB](https://qa.fmod.com/u/DaraDB)\
**Post date:** [March 29, 2020, 7:05pm UTC](https://qa.fmod.com/t/deactivating-a-damage-oneshot-when-the-death-oneshot-plays/15585/1 "2020-03-29T19:05:34Z")

</div>

![Screenshot 2020-03-29 at 19.59.53](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/4/4d121ad12ff9394e954c30dce235775136f24bfb.png)

Any suggestions? Is there a way of doing this without setting up variables? Like a ‘if then’ type situation with the other oneshot?

I’d appreciate any help, thanks.

---

<div class="post-metadata">

**Author:** ![alexzzen](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexzzen/32/6825_2.png) [@alexzzen](https://qa.fmod.com/u/alexzzen)\
**Post date:** [March 29, 2020, 10:15pm UTC](https://qa.fmod.com/t/deactivating-a-damage-oneshot-when-the-death-oneshot-plays/15585/2 "2020-03-29T22:15:08Z")

</div>

This seems like a question about Unity and C# programming in general. A quick fix would be to place your Hurt OneShot after the if statement and then use the `return` keyword after calling Death(), so it will exit the method before playing that sound again.

---

<div class="post-metadata">

**Author:** ![DaraDB](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@DaraDB](https://qa.fmod.com/u/DaraDB)\
**Post date:** [March 30, 2020, 7:06pm UTC](https://qa.fmod.com/t/deactivating-a-damage-oneshot-when-the-death-oneshot-plays/15585/3 "2020-03-30T19:06:29Z")

</div>

Sorry I’m completely new to FMOD and Unity. I’m not sure what an if statement would look like in this context.

Thanks
