Forum Discussion

PeteSmithies's avatar
PeteSmithies
Community Member
4 years ago

Loop conditions for trigger

Is it possible to add a loop condition in Storyline?

I want to have a trigger continuously "monitor" a page for a set of conditions and only show a layer - when those conditions are met.

e.g 
I have 5 objects on a page that can be shown/hidden - via check boxes.

Only when the correct 3 are shown (and the other 2 hidden) - should the layer get shown.
This works fine - unless the wrong objects are shown and then hidden
I then have to hide and re-show one of the correct objects for the layer to show.

Any suggestions?

Regards
Pete

 

  • NejcZD's avatar
    NejcZD
    Community Member

    Yes, one of the ways is to use a lopping animation of the screen. Use an animation path with the extra trigger "move when animation completes" so it will loop indefinitely.

    Then you just add one more trigger for your condition - DO x when animation completes IF my condition.

    I wrote this up quickly, let me know if it makes sense!

    • PeteSmithies's avatar
      PeteSmithies
      Community Member

      Hi Nejc,

      Still trying to follow your logic on this one?
      Can you explain more what you are suggesting?
      Regards


      Pete

  • PeteSmithies's avatar
    PeteSmithies
    Community Member

    Hi Nejc 
    Thanks for your response (by the way I used your excellent video to utilise the "always show on top" functionality... great work.
    WIth regards to this issue... not quite following you.. do you have an example that I could look at?
    Regards

    Pete

  • I prefer using custom Variables. And then use a trigger when that variable changes.
    Show Layer -> When the variable changes.... and you can use  some conditions on it...
    When closing the layer you set the variable to False again.

  • PeteSmithies's avatar
    PeteSmithies
    Community Member

    Hi Math,
    Thanks for your response.

    That was my initial approach - I was trying to use a number custom variable that added (or subtracted in the case of the incorrect images) to the variable - and when the variable = 3 That would show the success layer... but I think the reason that I am having issues - is because I need to use Check boxes to achieve the outcome. For some reason - the states of a check box dont seem to reliably add/subtract like I expect them to. 

  • PeteSmithies's avatar
    PeteSmithies
    Community Member

    I need to create an action that continuously monitors the slide for the conditions - in order to achieve my outcome.... So frustrating - in other software that I have used, I could  apply a continous loop - but this, like so many other features, does not seem to be present in Storyline. The more I use this software, the more irritating and lacking I find it!!

  • Yes it is in a lot of ways. I however find pleasure in finding ways to make impossible things happen in Storyline :)

  • Better... a working sample. However i tend to use Javascript for conditional things.... and or GSAP to hide/show elements...way and way easier...less triggers needed, thus in the end cleaner to read.

    But anyway here it is without JS...

    Making a copy of this now...how i would do it with JS....