Forum Discussion

zamond1's avatar
zamond1
Community Member
2 days ago
Solved

Why hasn't Articulate prioritized simple adding of multiple variables at once?

For instance, if I had the following variables (user-inputted values): blueberries = 6 strawberries = 7 bananas = 3 apples = 8 honeydew = 7 mango = 5 pears = 6 oranges = 9 waterme...
  • JudyNollet's avatar
    2 days ago

    You are correct about Storyline not having a single trigger that can sum multiple numbers. 

    However, you don't have to repeat the set of triggers that calculate the sum every time one of your input variables changes. Instead, you could do this:

    Create a "calculation" layer. 

    • Don't add any content to the layer. 
    • Set the Slide Layer Properties to "Reset to initial state." 
    • Set the timeline very short (e.g., 0.25 sec).
    • Create a trigger to reset your "totalFruit" variable to 0 when the timeline starts on the layer.
    • Create the triggers that add each separate "fruit" variable to the "totalFruit" variable when the timeline starts on the layer.
    • Create a trigger that hides the layer when the timeline of the layer ends.

     

    Back on the base, add triggers that shows the "calculation" layer when each "fruit" variable changes. So if you have 9 fruit values, there would be 9 triggers showing the layer.

    Yes, it's still more complicated than if there were a "sum" trigger. But at least this method is easier than repeating the calculation triggers whenever any input variables changes.

    Another option: run JavaScript for the calculation.