Forum Discussion
LaurenSenkbe568
4 years agoCommunity Member
Number and calculation Help
I have attached two screen shots and the storyline file for better understanding. I am confused how to go about this, or if this kind of interaction is even possible! Is there a way to add four diff...
MariaCS
4 years agoStaff
Hi, Lauren, and welcome to E-Learning Heroes! ✨
Thank you for sharing your .story file!
Dwayne gave you a great starting point to learn about multi-step calculation and also mentioned an important aspect: trigger order matters.
I am attaching your edited .story file, where I made some suggestions on how to accomplish the calculation. Here's a quick overview:
- Add the input (numeric entry) to each rectangle the user should enter the numbers into (1st, 2nd, and 4th).
- I set up the 3rd rectangle to calculate automatically, but you can change it back to a numeric entry if you'd like.
- Create three additional variables: subtotal, division, and total.
- Create the triggers for the calculation, which will happen when the user clicks Button 1:
- Set variable subtotal to equal NumericEntry
- Add NumericEntry1 to subtotal
- Set variable division to equal subtotal
- Divide variable division by NumericEntry2
- Set variable total to equal division
- Reference the variables subtotal and total on your slide.
- Add a new layer called Success. You can edit that layer to look like your second image above.
- Create a trigger that shows the layer when the user clicks Button 1, with the condition that it matches the value you want.
Let me know if this works!