Forum Discussion

AllanDunlop's avatar
AllanDunlop
Community Member
6 years ago

Can a variable-triggered 'hidden' object remain hidden on revisit, despite 'reset to initial state'?

Happy Friday, everyone!

My slides (and some layers) have audio narration that I want to restart on each revisit. I have them set to 'when revisiting, reset to initial state.'

Is there a way to trigger an object on the base to be hidden on a variable change in a layer, and for it to remain hidden on revisits to these slides?

i.e., 'Change state of [base object] to hidden when variable changes [layer variable]' and not have the object's state reset to normal on revisits.

Thanks for any suggestions.

Allan

  • NedWhiteley's avatar
    NedWhiteley
    Community Member

    Hi Allan,

    In the attached example, I have created a True/False variable, ShowShape that starts as True and changes to False when the Hide Shape button is selected on Layer 1 of the slide. The triangular shape is initially Hidden, but is changed to Normal when the timeline starts provided ShowShape is equal to True.

    As a result, when the slide is shown for the first time, the shape will appear at the start, but once the shape has been hidden by clicking on the Hide Shape button, the variable will change to False and so the shape will never reappear however many times the slide is revisited. However the text file (in this case a short text to speech file) will always replay.

    When you preview the example, first click on Show Layer, then Hide Shape, Hide Layer and Next Slide. Finally, click on the Previous Slide button on the second slide to return to the start. You should now hear the audio without seeing the shape.

    Hope this helps

  • AllanDunlop's avatar
    AllanDunlop
    Community Member

    Thanks very much for this, Ned! It works perfectly.

    I tweaked the file a bit to replicate my current setup. Also, I added a trigger to the layer, hiding the image on the base when the layer's variable changes to 'true.' This lets learners see that the layer component is completed while they are still on the slide.

    I really appreciate your diving in to help. Now I can make these changes in each of my modules and publish my new course--this was the last piece of the puzzle.

  • Hi, Katherine.

    If I understand correctly, you want the audio to only play the first time the user visits the slide, right?

    Here is my suggestion:

    • Create a True/False variable with its initial value set to False (we'll call it AudioPlayed)
    • Set your "Play audio" trigger to have a condition of AudioPlayed = False.
    • Create a trigger to change AudioPlayed to True after the media completes.

    Windows 10 (1) 2022-04-26 at 1.31.05 PM

    Let me know if this works!