Sum Variables or Test conditions for completion
Oct 01, 2018
By
Paul Tottle
Hi
I'm trying to test that all layers have been visited (in any order). To do this I've been setting a unique variable as true for each layer. Then I have a "Continue" button appear (or Complete Course) when all the layer variables = true.
But I can't work out how to do the trigger for when my whole list of boolean variables = true, ie the sum of = true. I can use the "On Condition:" part of the trigger to test each true/false variable, but what do I put in the "When:" & "Object:" criteria?
I could do:
When: Variable Changes To (True)
but that variable might be the first one to change, or the last one.
Any suggestions? Is there a way? Or an easier way?
Thank you.
7 Replies
I've tried using a "visited" button state but that doesn't work in my design as the buttons are redrawn on top for each layer, plus I'm using hyperlinks and they have triggers but not states.
Hi Paul
I add a trigger to each layer:
Not sure if you are changing the state of next button or what your action is but here is an example
Change state of next button to normal when timeline starts/ends on the layer on condition that layerA = True and layerB=true and layerC=true...make sure your trigger to adjust the layerA/B/C variable is before this trigger.
Here is a link to a demo I did in SL2
I just tried this one, but the "OK" button stays grayed out. So there must be something wrong with this way...
Ok. Thanks Wendy. Just read this comment, even though I posted another reply. I'll check out what you've done. :-)
Yes, I see that's using "visited". Unfortunately, I need to find another method because I'm using hyperlinks & buttons redawn on multiple layers.
I don't know why the trigger I posted above, would not be accepted.
By deleting the trigger above and entering exactly the same again, it worked. :-/
So I have a solution. I'm needing to trigger at the start of the timeline of all 20+ layers that tests the 20+ valuables set to true in those layers. Seems a bit of a crude method.
Any other options out there?!
Here is my current solution for firing a trigger when all layers have been visited or a certain number have been visited (CountUnder_K). This way I can keep adding layers and I only have to change the default value of the variable "Scenario1Count" to equal the number of layers. These triggers are added to every layer.
This also allows for feedback to learners about how many layers are still to be visited.
Any easier solutions welcome. Just keeping in mind I can't use "visited" button states.
This discussion is closed. You can start a new discussion or contact Articulate Support.