Forum Discussion

JoshuaThian's avatar
JoshuaThian
Community Member
2 years ago

Layer still loads even when trigger condition is not met

Hi,

I've been working on a trigger on a slide.

I have set a trigger to occur when timeline reaches 0.25s to load a layer when a variable (x) =  true

This layer will then play a narration.

I have then set the variable (x) to change to false when time reaches 2s.

The user will then progress to other slides, and will have to come back to this slide.

The layer still loads and narration plays when the user comes back even when variable (x) is = false.

Seeking some advice.

I have uploaded a copy of my slides below.

 

Thank you!

 

  • Your conditional trigger isn't re-running. Here's what's happening: 

    • The slide shows the layer at 0.25 sec.
    • The layer is open when the user returns to the slide. Its Slide Layer Properties for revisiting are set to "Automatically Decide." The program's decision is to reset/replay the layer. 

    The solution is simple: adjust the Slide Layer Properties to "Resume saved state." 

    If you do that, you can also delete the condition on the trigger that opens the layer, and delete the trigger that changes the variable. 

    By the way, you can also delete all the triggers that change the buttons to Selected. Any object with a Selected state will automatically change to that state when the user clicks it. 

  • JoshuaThian's avatar
    JoshuaThian
    Community Member

    Thank you so much! That worked!

    Just for my understanding, is there a way to make the layer not open when the user returns to the slide?

    • JudyNollet's avatar
      JudyNollet
      Super Hero

      Your original conditional trigger is not re-opening the layer. A layer doesn't close until there's a "hide layer" trigger (or until another layer opens with properties set to hide other layers). You don't have  trigger to close the layer, so it's open when the user leaves the slide and remains open if the user returns to the slide. 

      Instead of the solution I described in my previous comment, another way to prevent the layer's audio from replaying would be to add a trigger that closes the layer when its audio completes, and use the conditional trigger to prevent it from opening again. 

      It really doesn't matter which solution you use. The learner's experience will be the same.