Variables across the project
Mar 02, 2017
Hi there! Fairly new user here, and I have a quick question! I understand variables are not slide-based but project based. So if on one slide, I add a trigger and a variable changes value (number variable), why does it not seem to hold that value (carry it over) when the user advances to the next slide?
For example, on one slide I have a trigger to add 1 to the variable if the user answers correctly, and then another trigger changes the state of an object if the variable is set to 1. That works fine!
But when I click continue and go to the next slide, I want the state of an object to change depending on the value of the variable (two possible options), but it won't! I can't figure out if the value isn't carrying over from the previous slide or what is going on. Any help is MUCH appreciated! Thank you!
4 Replies
Hi R Graham,
I suspect you added the trigger to somewhere else.
You need to check your trigger if it is on the right place.
You can check the content of a variable by creating a text box, go to Insert > Reference and when you preview, you can see the value, and know for sure that the variable is changing.
99% of the time, Matthew's suggestion solves this problem.
Thank you for your help... So I already had the trigger set to "when timeline starts." The first image (with red circles) is from the working slide.
The second image (with gray circles) is from the slide that is NOT working.
Essentially what I'm trying to do is if a learner gets the question correct, the value of the variable is increased by 1 and the timeline state advances to 2. If the learner gets the question wrong, the value of the variable decreases and the timeline state decreases. I would like to do this for four questions on different slides.
Maybe there's an easier way to accomplish this?? Any help is much appreciated!
Okay so I got it figured out, Walt your suggestion to add the text box solved the problem! It was doubling the added value. Thank you!
This post was removed by the author
This discussion is closed. You can start a new discussion or contact Articulate Support.