# OnEventStopped only triggered when i quit PIE

**URL:** <https://qa.fmod.com/t/oneventstopped-only-triggered-when-i-quit-pie/15650>\
**Category:** Unreal Engine\
**Created:** [April 15, 2020, 12:35pm UTC](https://qa.fmod.com/t/oneventstopped-only-triggered-when-i-quit-pie/15650 "2020-04-15T12:35:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shentoza](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Shentoza](https://qa.fmod.com/u/Shentoza)\
**Post date:** [April 15, 2020, 12:35pm UTC](https://qa.fmod.com/t/oneventstopped-only-triggered-when-i-quit-pie/15650/1 "2020-04-15T12:35:14Z")

</div>

Hey there,  
I’m currently implementing our dialog system, which uses audiotables and Events to play programmer sounds that contain the voice lines.

```
    AudioComponent = GetOwner()->FindComponentByClass<UFMODAudioComponent>();
	if (AudioComponent) {
		AudioComponent->OnEventStopped.AddDynamic(this, &UDialogParticipantComponent::OnDialogLineEnded);
		AudioComponent->SetEvent(Event3D);
	}

```

That’s how I hook up the OnEventStopped to my dialog system.

And then I set up the ProgrammerSound and play it

```
void UDialogParticipantComponent::PlayProgrammerSound(FString& Name)
{
	AudioComponent->SetProgrammerSoundName(Name);
	AudioComponent->Play();
}

```

But the OnEventStopped function is never called. Only when I leave the play mode, it will execute the function.  
Is my setup wrong?

---

<div class="post-metadata">

**Author:** ![Shentoza](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Shentoza](https://qa.fmod.com/u/Shentoza)\
**Post date:** [April 16, 2020, 7:56am UTC](https://qa.fmod.com/t/oneventstopped-only-triggered-when-i-quit-pie/15650/2 "2020-04-16T07:56:04Z")

</div>

Basically what my intention with this is:  
Playing a single dialog line, which lies in a localized audio table. When the event/programmer sound finishes, call the next dialog line to be displayed and played through FMOD.

But so far I can’t find a way to hookup to the OnEventStopped callback. Does it have anything to do with our programmer instrument being async?

---

<div class="post-metadata">

**Author:** ![Shentoza](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Shentoza](https://qa.fmod.com/u/Shentoza)\
**Post date:** [April 20, 2020, 8:42am UTC](https://qa.fmod.com/t/oneventstopped-only-triggered-when-i-quit-pie/15650/3 "2020-04-20T08:42:38Z")

</div>

Alright! I figured it out!  
We had sustain markers in our async events, because we thought our Programmer Sounds would otherwise not play for their full extents, but they appearently hindered the event (instance) from stopping properly.  
When I deleted the sustain markers, the callback was fired again, and everything works as intended.
