Variable not triggering state change
Jun 18, 2014
I've built a branched interaction where by at the end the learner is (supposed to be) shown the route they have taken.
To trigger this, i have used number variables,conditions and states. The button clicked determines a value and then the value then should determine the state change of a particular state on a later slide.
However, It's not doing that. The variable is working as i'm checking using %----% but it will not change the state. (I've also moved the variables to the top of the trigger panel)
Anyone any ideas where i'm going wrong?
72 Replies
Did you have the triggers on the layers?
Yes, I put the triggers on the layers.
Sorry I'm flying blind on this one - I'm sure support can get you on the right track.
Totally understand Wendy - I really appreciate you trying to help me figure it out.
Wish me luck!
I figured it out - trigger order!!! On the base layer I had it showing layer BEFORE the variable was adjusted. When I moved the variable adjustment (add value of 1) above the show layer, it worked.
Thanks for your help Wendy.
Holly
Woo hoo - go Holly - glad you got it sorted...good luck with your project!
Way to go Holly! Thanks for popping back in with an update.
Holly! I have been looking at my course for about 2 days off and on trying to figure out why it wasn't working properly. I found this thread this morning. I saw your response and changed my trigger order. OH MY GOODNESS! It worked. I was ready to throw my computer away!
Thanks for sharing!
Woo hoo!
Glad this thread was able to help you out as well Daphne :)
I am having a similar issue as above. I have tried all of the suggestions and still can't get it to work. I have a menu where the state of the object is to change to "completed" when the variable of the modules the menu item leads to is at "true".
I have attached a version of my document with the information taken out. Please advise. Thanks!
You need to change the triggers that provide the state change from "when user clicks" to "When timeline starts". See attached file where I made that change for module 1.
Is there no simple way to change the state of an object based on the status/value of a variable?
Does it always have to be tied to an event?
Hi Tim,
Yes, the trigger has to have a "When" associated with it. The "When" can be when the value of Variable X changes, but keep in mind that will need to occur on the slide where you're also changing the state of the object.
If you need help figuring out another method, feel free to share your .story file here for folks in the Community to take a look at!
Ashley,
Thanks for getting back to me.
I think the issue was occurring because I was trying to change the state of an object on another slide.
Essentially - I have a number of courses on separate slides - with a parent slide acting as a menu to each course.
Was hoping to use a variable to change the state of the course titles to a 'complete state' (on the parent slide) - only when when a user actually completes a course.
I know there is a 'Visited' state - but that doesn't really help indicate if a user only partially completes a course.
Kind regards,
Tim
Hi Tim,
Ah, yes - if you're trying to change the state of an object on another slide based on when a variable changes on another slide that can get tricky. If you want to share a copy of your .story file here with folks, we can take a look and offer some advice around the specific setup!
Ashley,
Unfortunately I can't share - but if you have any suggestions - I would be interested to hear/trial!
Thanks,
Tim
Hey Tim,
I put together a short sample to show you what this may look like for you and hopefully it's enough to inspire/demonstrate how to implement this in your course.
Here are the published output and the project file for you to dig in.
Hi Leslie,
Thanks for this (and apologies for not getting back sooner!!).
I have tried a similar approach to your suggestion - but it doesn't seem to work.
Would it have something to do with the timeline of my 'parent slide' not restarting when I return to it?
Kind regards,
Tim
Hi Guys,
I think I have cracked it - the order of triggers in this scenario is important.
I had 2 triggers on the same button
Trigger 1- Jump to a Slide
Trigger 2 - Adjust a Variable
It seems the variable was not being adjusted, I am guessing the variable was not being adjusted because Storyline had already jumped to another slide.
I deleted and re-applied the triggers in reverse order, and it seems to work as expected now!
Tim
Correct, trigger order is very important. Here is some info.
Hi Guys,
I too had the same issue as I was trying to assess the learner's performance on the storyline course, by checking there responses over the customized quizzes. I applied variables and triggers on the radio button and custom button of the quizzes and assigned the state change based on the responses, which I need to reveal it towards the end of course. I badly struggled with this, and I was on the verge of despair.
But a big fat thanks to you guys, I followed this thread, each and every conversation precisely. I am happy that I resolved my issue. Thank you! 😇
Learnings are everywhere! 😊
Hi Howard,
You can share your file by clicking add attachment at the bottom of this text box, and then selecting your .story file from your system. Then someone can look at it for you.
Somethings to remember that may help.
Objects positioned on a slide will always start at their default condition as built on the slide. You can change that condition when the slide starts by selecting a trigger that uses "When timeline starts" This also holds true for objects on layers, and the states of objects on the slide.
Variables persist across the project. This allows you to set a variable on one slide, and then use that value to set something on another slide. You can cause an action based on a variable updating, but only on the current slide. If the object needs to change on another slide, you will want to set that object when the slide starts.
If you have multiple slides that need to respond to the condition of a variable, then you need to set a trigger for those objects on every slide where they appear.
Hopefully this information will help you to understand how slides and variable interact. Please feel free to upload your project, and I'm sure someone will troubleshoot it for you.
Dave
This discussion is closed. You can start a new discussion or contact Articulate Support.