Forum Discussion
Complex formulas using variables?
I am working on some interactive scenarios for which a score would be calculated at the end based on many variables, including built-in ones like how many interactions were had.
For example, I want to calculate something like ((A+B)/C+(D-E)*2)/100 (where each letter here obviously represents a variable or built-in value) and display the resulting value in a text box as a "final score." How would I accomplish that?
2 Replies
- JudyNolletSuper Hero
In case others stumble upon this thread, the author asked a variation of the same question here: Show results of complex calculations involving multiple variables? | Articulate - Community
There, the reply marked as the solution referred to JavaScript.
Another reply included a file demonstrating that, in Storyline, calculations have to be performed trigger by trigger. I also replied with a link to my post: PRIMER: Trigger calculations in Storyline | Articulate - Community
Bottom line: PhilMayor​'s reply above contains both options for performing calculations.
- PhilMayorSuper Hero
Use a few triggers or write the expression in javascript
If you use triggers it maybe cleaner to put the calc on a layer and show it and then hide it the layer when you need the calc to be performed.
Related Content
- 12 months ago
- 12 months ago
- 12 months ago
- 12 months ago