Forum Discussion
Formula calculation
Hi Everyone,
I need to perform a calculation in the storyline, which has the formula in it.
-----------------------------------------------------
User Input (a,b,c) and I have created the variables (E, F, G, H)
To Find:
E=(a/(b/c))*2
and have to display
F=E*2
G=E*4
H=E*6
----------------------------------------------------
Is this something that can be done in Storyline or does it require javascript?
Any help is much appreciated!
Thanks
Sudhakar
- Dave-RuckleyCommunity Member
You could do this if you break it up into a number of triggers. There may be a more slick way of doing this but just using storyline triggers this is probably the easiest way.
divide b by c
divide a by b (which is now different to what was entered)
multiply a by 2
Set E to value of aThat's the first bit. Then you just need to calculate the others. You'll see that after each answer is set I multiply E again so that the next set of calculations can happen.
Multiply E by 2
Set F to that answer
Divide E by 2Multiply E by 4
Set G to that answer
Divide E by 4Multiply E by 6
Set H to that answer
Divide E by 6I've attached a storyline file which should help make sense of this!