Forum Discussion

LisaFalzon's avatar
LisaFalzon
Community Member
5 months ago

Prevent Learner from advancing until they have viewed all the layers

How do I prevent Learner from advancing until they have viewed all the layers?

I have attached screen grabs where I have circled things in yellow.

One of the things the user clicks on to reveal a new layer is single image and the other two are each a group of to images. I don't seem to be able to select groups in the trigger. I then thought, instead of having conditions of objects, I could just have it so once all the layers have been viewed, they can move forward. But, as you can see from my final screen grab, I am not sure what to put in for "when the state of". The Click to close buttons seem to not show in the "When" dropdown, only in the "Conditions" (under object tab).

I'm sure it's an easy fix. Please help!

Thanks

Lisa

  • AndrewHanley's avatar
    AndrewHanley
    Community Member

    HI Lisa,

    So you could either use STATES like it sounds you already are trying to do.
    However, a GROUP cant have a State, so you would need to have one of the assets in each group have a VISITED state. This should now work in your button condition because instead of selecting the group, you select that specific asset.

    Another way to do this (and the way I would go for, because its easier to change and amend) is to use a T/F variable for each of your clickable items. Sent it to TRUE once clicked for the first time, and have a condition on your button trigger that checks for all variables being equal to TRUE.

    That will work well.

    Hope it helps! :)

  • LisaFalzon's avatar
    LisaFalzon
    Community Member

    Hi Andrew

    Thanks so much. I am not so experienced in Storyline to know how to so the second option you mention. And flattening the images will take a bit of time.

    What I don't understand is why what I have done here isn't working (see screen grab-highlighted blue is the Object Trigger I have created). It also has a Slide Trigger of: "Set state of Next button to Disabled When the Timeline starts on This slide."

    Any ideas why this does not work?

    Thanks

    Lisa

  • AndrewHanley's avatar
    AndrewHanley
    Community Member

    I can see a few problems here Lisa.

    You need to DELETE the existing trigger that says 'Jump to slide Next Slide When the user clicks or swipes Next". Its doing nothing for us.

    Secondly, your "Set state of Next Button to Normal" trigger is using the same Asset in all three conditions:
    "If the state of Click to close = Visited
    and the state of Click to close = Visited
    and the state of Click to close = Visited

    This should have three different assets mentioned here, not all the same one.

    Finally, I even if you had the conditions correct, I doubt it would work, because you are trying to set the state of the Next button to NORMAL "when the user clicks or swipes" but remember, you already set the Next button to DISABLED so its impossible to click or swipe it!

    So here is something you could try.

    Forget changing the Next button to disabled. Delete that trigger.

    Also delete the "Set state of Next Button to Normal" trigger that we just spoke about.

    Instead, add a new trigger that says:
    "Jump to slide next slide
    When the user clicks or swipes Next
    If the state of <Asset 1> = Visited
    and the state of <Asset 2> = Visited
    and the state of <Asset 3> = Visited"

    That should work :)

    Let me know how you get on.

     

  • LisaFalzon's avatar
    LisaFalzon
    Community Member

    Hi Andrew

    I had the three buttons all named the same, so added air, sea and road to the end of the names and it's worked. Strange though that the next button goes from faded grey to solid grey after the first button is clicked, rather than only after the third button is clicked. Other than that, it has worked! 

    Thanks

    Lisa

  • AndrewHanley's avatar
    AndrewHanley
    Community Member

    Glad to hear its worked Lisa! Good job.

    If the NEXT button is becoming clickable too soon, its either a problem with the trigger on the Next button, or all your assets are in the same Group (so when one is clicked, they all register as clicked)

    I would start by checking that Next button trigger though... ;)