# Trying to create a Formula with Triggers - Help!

Ok, I don't quite understand the triggers yet. I am trying to create a formula that calculates a percentage based on triggers, unless there is a better method. I was trying to follow this tutorial, http://community.articulate.com/tutorials/products/adding-and-editing-triggers.aspx but can't find the Set, Multiply, or Add.

Here is my example:

User can selection one of two buttons Option A or B. Upon selecting one of the buttons, example Option A, trigger will add +1 to Option A, trigger will +1 to Total, and trigger will divide Option A by Total, and then recalculate the Option B percentage because Total has increased. This should give me a running percentage of the respondent's choice.

** I don't understand how to create a trigger that will divide Option A by the Total. I understand the math, but don't understand the Storyline steps or language.

Option A

Option B

Total

How do I reset counters to back to zero?

How can my reference be formatted to a percentage instead of a decimal point?

## 5 Replies

Hi Kevin, I tried to write an explainantion and then tjhought it would take less time to build it, hope this makes sense

percent.storyTo reset counters just add a button to reset the variables to 0

Phil, I added a temporary button that resets to zero. There are still some odd calculations. The slide always starts off with 1 for Actual and Error, then there are some odd calculations. Is there greater documentation I could read on triggers, that is my problem, not understanding all the logic. The math is simple. Copy attached.

introduction+to+forecast+accuracy.storyThanks Phil,

I am going to walk through your example, I'm it's accurate and will be a valuable resource for other users in the future.

Have a super great day! Have to run out for a bit.

Kevin

Not sure if there is any documentation, I sort of learnt this by trial and error. Nice looking course, just a suggestion you might want to change the colour on the black buttons to contrast with the background.

Your error is because the initial value of error and actual is 1, press the X on the triggers pane and you can reset that to 0

If you have any more problems let me know

phil