Branched Scenarios...Do I need Variables?

Hi, Sherrie -Here's an easier way to do what you want without having to use any variables other than the Question variable that's created when you create the question.Say you have a four-option multiple-choice question to which Lectora assigns the variable name Question_0001. Create three rectangles or empty text boxes with a non-transparent background that matches the color of the page background and set them to be initially not visible (deselect "Initially Visible"). Position a rectangle/text box over each of the incorrect answers and name them something like "Blocker1," "Blocker2," and "Blocker3."At the page level, set an action that shows Blocker 1 on the condition that Question_0001 is equal to whatever the text is for the first incorrect multiple-choice answer. Do the same thing for the remaining blockers and incorrect multiple-choice answers.Now, when the learner clicks the button to go back to the "kick-off" page, the incorrect answer they chose before will be hidden by the blocker!The only downside to this approach is that, if they choose another "wrong" path and go back again, the first wrong answer they chose will be visible again. If you want it to remember what they chose the first time and have both options hidden, then you would have to use variables to keep track of that.Variables really don't have to be scary....they're basically just "buckets" that you can use to store info for use later or to keep count of something. You use a variable everytime you create a quiz question in Lectora! To create your own variables, all you really need to do in Lectora is to name it. To use the variable you created, you just use "modify variable" in the Action field in the Action dialog box and then use the "Modification Type" field to tell whether you want to store information (by selecting "Set Variable Contents") or add something the a variable that's already storing information, such as incrementing a counter (by selecting "Add to Variable"). (There are other modification types, but those are the two you'll use 95% of the time.) Once you have information stored in the variable, you can use that information in a condition for an action ("do this action if Counter is equal to 3," where "Counter" is a variable you created and incremented through some other action) or to dynamically fill a text box using the "Change Contents" action with the variable name in the "New Contents" field.Hope this helps!LauraEdited By: Tecocat on 2008-10-21 13:28:20

Discussions have been disabled for this post