Triggering Audio Player from Verse Script Doesn't play sound

Summary

I have an audio manager verse script that has an audio_player_device added as an editable. The script is simple and should play the sound when the function is called. CueAudioDevice.Play() But I don’t hear a sound from my audio device.

I know the player is working bucause I can add an on trigger event with a button to the audio players “Play” Function and every time I interact with the button the sound works

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Audio

Steps to Reproduce

  1. Add an Audio device
  2. Wrive a verse script:

AudioManager := class(creative_device):

@editable
CueAudioDevice:audio_player_device = audio_player_device{}

PlayHurtAudio(TargetAgent:agent):void=

    Print("Hurt Player")
    CueAudioDevice.Play()
  1. have a script call the PlayHurtAudio fuction
  2. Make sure you add the AudioManager to the scene and link the audio player as an editable.
  3. Run Session and trigger the script to call the playHurtAudio function.

Expected Result

When the CueAudioDevice.Play() is called I expect to hear the audio

Observed Result

Currenlty no audio is triggered in Verse only with the button. I know my code is working because the log “Print(“Hurt Player”)” is showing on my screen.

Platform(s)

Testing with UEFN on Windows 11

I’ve also went through this guide and still no luck :frowning:

It seems to be broken when trying to trigger audio in a verse script used as a NPC behavior override

Okay, It seems to actually be broken in the NPC Behavior verse script when you are already playing an animation sequence the audio player can’t play a sound.

Use case I’m trying to accomplish. my verse script triggers an attack animation. in this case swipe of hands, Then in the middle of that I check if the player is within distance and if so I remove health and play a “hurt” sound cue using my audio player. If I disable the line of code that plays the animation and just check if the user is in distance the sound will play. So something with the animation breaks the sound cue in the audio player.

Looks like a bug?