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?