Variables nightmare (2)

Jun 03, 2016

As noted in my other post, I am having numerous variables challenges.

I like to use true/false variables for navigation especially, and while I understand them in theory, they regularly don't work in practice. I spend large amounts of time taking courses to pieces, trying random fixes and going through my courses over and over testing them.

I work on my own so I have nobody to do a sense check. People on these forums do kindly help me which is wonderful, but it does mean that I don't learn how not to create the problems in the first place.

Does anyone have a w0rkflow, checklist or just some general tactics that help them create and test variables?

3 Replies
Christie Pollick

Hi, Katherine -- Thanks for reaching out and so sorry to hear of your difficulties! While I will defer to your fellow community members to offer their specific recommendations and advice, I thought I might pass along the following general resources on using variables in case they are of interest:

Hope that helps! :)

Walt Hamilton

The most important thing to remember about creating variables is to name them correctly. Three days from now, you will have no idea what Variable1 does, but 30 years from now you can open your story, and you will know what NumberofLayersVisitedonSlide21 is used for. Beginners make the mistake of trading a few keystrokes saved now for hours of time lost in the future. No matter how long it takes, give each variable a name that describes what function it serves in the program.

The very best testing tool, bar none, is the variable watcher. Create a text box (CTRL-t), choose the insert tab (ALT-n), choose reference, and choose a variable. In the text box, it will look like %Method%, but when you preview, it will be replaced with the value of the variable. Place one everywhere you expect the variable to be changed, or used. That will help you understand if the problem is with the variable being set, or if it is with the logic that uses it,

The final step in the debugging process is to think like the program. There is a brain that goes through the triggers when an activity occurs (user clicks, timeline reaches, etc.). The brain reads the trigger, and assigns it to a minion. Then it goes to the next trigger in order. Many people run into trouble because they don't realize that triggers are executed in order. It assigns another minion to do that task, Each task is read and assigned to a minion, regardless of the results of previous triggers. The only exception is that if one minion is assigned to jump to another slide, when it jumps, the brain quits reading triggers. Otherwise all triggers are executed, unless there is a specific condition that prevents execution. Sometimes things appear to fall apart when they haven't. A trigger is executed, but before a human can realize it, another one is executed that changes the effects of the first one.

This discussion is closed. You can start a new discussion or contact Articulate Support.