Forum Discussion

SafFuller's avatar
SafFuller
Community Member
23 days ago

Variables & triggers

Hi everyone, it's been a while since I asked a question, but I'm at my wit's end and could really use some advice. What am I missing here?

I have 4 elements on the page. When clicked, each one shows a layer for a short time, then shows a "visited" state. The goal is to trigger a 5th layer after all 4 have been revealed. I've tried using number and true/false variables within triggers, but no luck.

In the example I attached, I switched to using object state changes, where the 5th layer should trigger once all 4 objects are marked as "visited." Still no success.

I also have another slide where I need to prevent users from advancing until all activities are completed, and the same approach hasn’t worked there either.

Please tell me I'm missing something simple. Looking forward to your thoughts. Thanks for reading!

Saf

  • SafFuller's avatar
    SafFuller
    Community Member

    Sorry, I forgot to add that I also tried the above trigger using When the state of all xxx is visited, as below. Still nothing. Thanks

     

  • Hi Saf. Layers 1-4 have the "Hide other layers..." option checked, which is preventing the Webpage layer from appearing.

     

  • The problem with this trigger is the "when." It's set to run when the timeline starts. Well, that moment has come and gone before the user has a chance to click anything.

    The trigger below works. But you're not seeing it because it fires before the trigger that shows the layer for the last-clicked/Visited icon. (You can see this for yourself if you change the Slide Layer Properties so they don't hide other layers.) 

    In any case, if the final layer did show as soon as the buttons are Visited, that would prevent the user from viewing the layer for the last-clicked button. 

    This post has a demo file that shows how to ensure users visit all layers before the Next button is available. You're not using the built-in Next button, but the same programming concept applies. TIP: Controlling the NEXT Button 101 | Articulate - Community 

  • The trigger is set to when timeline starts of the slide so will only work then. You need one based off when all the states are visited. Even then it wont work how you want as it would hide the last layer. Probably best to have a button appear or fire it off the timeline end of one of the layers.

  • You wrote: "When clicked, each one shows a layer for a short time, then shows a "visited" state." - but that's not actually how it works. The 'visited' state is a built-in state that automatically changes to visited the second the button is clicked - not after it does whatever trigger you have on it (like view a layer). When they select the fourth icon, it will instantly change to visited, which should trigger both the 4th layer AND the Webpage layer to open. 

    If the layer properties on all layers are set to 'hide other layers' you'd only see whichever one happened to open last (triggers that theoretically run at the same time (like on click or timeline start) don't happen simultaneously; they happen one after another, fractions of a second apart, in order listed in the triggers panel). My guess is that the trigger to open the fourth layer is further down the list than your trigger to show layer webpage.

    If want to manually trigger the icon to change states after the layer is viewed 'for a short time', then you could duplicate the visited state of the icons but name it something like 'viewed' (something other than a reserved state that has built-in behavior already attached to it, like 'visited'). Then trigger the icons manually to change to 'viewed' when desired (vs when clicked), and update the trigger to show layer Webpage when the state of all of the icons is 'viewed'


  • CharlieHammer's avatar
    CharlieHammer
    Community Member

    I created a variable that adds 1 at the end of the timeline for each layer, then the Webpage fires when the variable reaches 4. I also made it so the layers stay displayed instead of disappearing.