Number and calculation Help

Apr 06, 2021

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 different number fields where the learner can type any number in, then press a calculate button and have that total appear? 


The learner in this case MUST have the total be 266.67 in order to proceed to the next slide. If they don't get the calculations right they have to try again. 


I have tried building it out, but nothing I do seems to be working. If anyone can help me out, It would be greatly appreciated. 



4 Replies
Maria Costa-Stienstra

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!