Problems with variables
Dec 13, 2012
Hi there,
Hope that someone can help me out with some variables I'm using as I can't see what the issue is with them.
I have a screen that serves as a menu, with three topic buttons on it that then branch to the relevant topic content. I've tried to set up variables to create a traffic-light system on the menu, whereby:
Red = the topic has not yet been accessed at all
Amber = the learning for the topic has been completed but the quiz hasn't been taken/passed
Green = both the learning and the quiz have been successfully completed
I've set up a true/false variable for the amber status and a trigger on the final learning page to adjust it when the learner clicks on a button to go back to the menu:
Set "Learning" equal to True when user clicks
and another for the test element that says:
Set "Test" equal to True when user clicks (this is on a button that takes the user back to the menu)
if Results.ScorePercent is greater than or equal to 80
I've then got a trigger on the traffic light graphics back on the menu page that should alter the state of the graphic with these conditions:
Change state of traffic light to
Learning Complete
When Learning changes
If Learning = True
and Test = False
or Results.ScorePercent > 80
Change state of traffic light to
Quiz passed
When Test changes
If Test = True
and Results.ScorePercent => 80
I've tested this out a few time in preview mode and nothing changes with the states at all. Can anyone please identify what I'm doing wrong here?
Thanks,
Laura
5 Replies
Laura,
The first place I'd start is the trigger order on your pages. Does the adjust variable trigger fire before the jump back to menu slide trigger?
Mike
Oh...
I'd also try setting your menu slide triggers from:
Change state of traffic light to
Learning Complete
When Learning changes
If Learning = True
and Test = False
or Results.ScorePercent > 80
To
Change state of traffic light to
Learning Complete
When Timeline Starts
If Learning = True
and Test = False
or Results.ScorePercent > 80
I ran into that the other day myself.
Thanks Mike, the variable trigger was showing after the button trigger to go back to the menu, so that must have been it!
I've changed that along with the When Timeline Starts suggestion, made one or two other tweaks and all seems to be working now - thanks!
Laura
SWEET!
Trigger order is usually a culprit in many of these situations. Glad it's working.
Mike
I had a similar issue and setting the state change trigger to "when timeline starts" was the key. This is not something that I found intuitive.
Glad I found this thread!
Thanks to both of you.
Nathan
This discussion is closed. You can start a new discussion or contact Articulate Support.