Audio not playing after expert answer appears using triggers

Nov 18, 2021

I have a slide that uses Object and Variable triggers to display content. I'm using a variable so users can type an answer and then click to display the "expert answer", which is initially hidden. I also have two audio files, one of which I want to play once the "expert answer" appears.  

I have the second audio set to play after the first audio file completes If the state of my expert answer = Normal. 

Here's my dilemma: If the learner types their answer before the first audio file ends, then everything works great. However, if the learner waits to type their answer after the first audio files ends, then the second audio file never plays.  

I feel like the issue is about the order of the triggers, but I can't seem to change the order of the object triggers. Furthermore, I have the same results even if I remove the second condition on my audio trigger, which makes me question whether timing is the real issue. 

Any suggestions on what I could differently to always get the second audio to play? I've attached a copy of the slide in question. 

4 Replies
Maria Costa-Stienstra

Hi, Esther.

Thank you for sharing the .story file!

One suggestion I have for you is to add another trigger and variable to check when the first audio is done. In the example below, I created a True/False variable called audiodone:

Windows 10 (1) 2021-11-18 at 12.20.06 PM

I'm attaching the edited .story file. Let me know if this works

Maria Costa-Stienstra

Hi, Esther. 

I'm happy the suggestion works for you!

The variables work through the entire project, so if it's True at the end of the first slide, it will remain true when the second slide starts. 

While you can change it to False at the beginning of the next slide, it might cause you some issues if the user is able to return to the previous slide. I'd suggest either:

  • Set audiodone to False when the timeline starts on every slide you use it (including the first one), or;
  • Create separate variables for each slide you need to check when the audio is completed.

I hope this helps!

Esther Eccleston

Yes, this helps. I believe the value of my course has just increased tremendously because you have helped me learn how to control the narration for this set of slides. I ended up creating a new variable for each slide - it is quick and easy and seemed like the best path to ensure consistent functionality. 

Thank you so very much for your help!