# Storyline variables

Apr 03, 2013

Hi all!

I am having two small problems with variables and was hoping someone could look at this test scene. I have created a math class and wanted the students to work on some problems using storyline.

1) in the rate box, I need to put a two digit decimal number, in this case, point 25 variable would be .25. Whenever I do that, SL converts the number to 0.2, which of course gives the wrong answer.  Is this a bug or is there a workaround. In all cases, I found SL only to hold two digits. With whole numbers that is fine but now with decimals, I need those two digits and not include the leading zero or the zero before the decimal point.

2) If I put the wrong number in all the boxes or variable values, it goes to my wrong slide, however, if one of the numbers is incorrect, the slide should go to the wrong answer slide but does nothing instead.  This makes is hard for the student to know what do to.  Again, it works perfectly if they put in all wrong answers but does nothing if any one of the variables is correct  and the others are wrong.

Elaine

###### 3 Replies

Hello Elaine! I took a look at your variables and tweaked your triggers some, so it should work now. See attached file. Below are a few helpful tips that may help you next time you work with variables:

• Try naming your variables so that they are easier to identify. For example, in your course, you name your variables, "50", "200" and "Point25". It's usually not a good idea to use a number for a variable name. Instead, a better choice may have been, "Rate", "Portion", "Base" and "Percent". That way, when you are creating your trigger, it is much easier to read and understand, such as:

If Rate Not Equal to 0.25.....

• For the trigger you wrote to jump to the incorrect slide, the trigger was only jumping to the slide if  all three wrong answers were provided because you used the "and" operator. The rule of thumb to remember is that "And" means that ALL conditions must be met, while "Or" means that only one condition must be met for the trigger to work.