Forum Discussion
Changing state of buttons after section is completed.
I have a menu slide with six different topics (buttons). What I would like to happen is when the user clicks on a button, it would link them to a topic and when they complete that topic it would then link them back to the menu page, change the state of that button to visited.
I have created a true/false variable and set it to false and then have placed a trigger on the last page of the section to change it to true.
I then created a trigger on the menu page to change the button from Normal to Visited when the variable is changed to True.
However, when I preview it, the button changes to Visited state when I click on it, prior to going to the section and is back to Normal state when returned to the Menu.
Any thoughts?
Thanks
45 Replies
- GerryWasilukCommunity Member
Does this help? http://community.articulate.com/forums/t/12285.aspx
- KenCortnikCommunity Member
Good information that I'll use but it didn't help with my issue.
When leaving the slide and then coming back to it is where I'm having problems. I tried playing with the slide properties but that didn't work eigther.
- GerryWasilukCommunity Member
Thanks! I've done this quite a few times and here is what I did.
Rather then use the stock visited state, I added my own state to each of the menu buttons. I called the new state "Completed." I usually gave the button a checkmark to show the completion of a topic.
Then I delete the stock visited state for each button as it's no longer needed.
For each of the sections, I have True-False variables, initially false, to denote that I had completed a section. The last page of each section set its corresponding variable to true.
Be sure to set this variable to true BEFORE you leave the last page of a section, BEFORE your trigger to move to a slide or scene.
Then I added Slide Triggers for each of the buttons setting them to the "Completed" state when the Timeline started if the corresponding variable was true.
- JillianRickerttCommunity Member
Hi Gerry. When I do this and then go in to change the state to Completed when Timeline Starts I don't see the Completed State in the drop down and I'm not able to manually add it. If you're still around after 4 years would appreciate advice.
- WendyFarmerSuper Hero
Hi Jillian
'completed' state is a custom state that you would need to create on the object.
click the object, click the states tab, edit states and then you can duplicate the normal state and call it completed and make any changes to it you want (eg colour change or add an icon to represent it is different to other states) It will then appear in the dropdown list (in its own section) to allow you to add to a trigger.
hope that makes sense
- JonathanWorkmanCommunity Member
Gerry- Just curious as to why you choose to use variables rather than Change State trigger in the above example. Is there a design/ functionality reason that makes this better or do you just enjoy working with variables? Here's how I typically handle this issue (minus your checkmarks for completion, which are a good idea):
I have learned a lot from your posts and am always looking to improve my Storyline skills!
- RobertSinkaCommunity Member
Thanks Jonathan! It is working! And very simple.
Robert
- PhilMayorSuper Hero
Visited always fire when pressed, so like Gerry I always use a completed state, and use T/F variables to track this. I believe this is best as it is the best way to check slides have been viewed instead of using a visited state.
I believe the visited state is best to use only within a slide. My rule of thumb is, if you are tracking on a slide use the visited state, if you are leaving and returning to a slide use a variable, and a custom state.
This is a lot more flexible and I believe a more elegant design than using the visited state.
In short, what Gerry said
- GerryWasilukCommunity Member
Hey, Jonathan!
What Brother Phil said.
He's my guru on variables, along with Steve Flowers. Great folks!
One more thing, since Storyline does not yet have a debugger, you can always put references to your variables on your slides to see if things are working right. Not a true debugger but at least it helps.
I could do things on one slide sometimes and just change object states but that often gets too complicated for me--and very, very complicated slides can often slow the app down (at least they did early in the beta so I've shied away, whenever possible from complicated slides--it also lets me keep things straight and coherent by keeping things simple).
I like to have menu slides where learners can view the main content in whatever order they want. Some of the branched paths from the menu are one slide long (and usually have many layers on them)--while other paths are many, many slides.
Because of this, as Phil's rule of thumb, variables are really the only way to go. So I want to be sure that folks do not get credit for completing a path until they have viewed everything or have done something else.
- JonathanWorkmanCommunity Member
Phil & Gerry: I knew there was an explanation behind it and now this makes perfect sense. Plan on incorporating this design element into future projects...good stuff!
- JoeDeeganCommunity Member
I must be missing something because I'm having trouble getting this to work following Gerry's instructions. I have a menu slide where I want the button object to change to completed after a quiz slide is completed. Here's the steps I followed, notice any issues?
- Created a new "Completed" state and removed "Visited"
- Created variable "True/False" variable set to False.
- Created an "Object Trigger" so that the variable is changed to True when the user clicks the "Submit" button.
- Created a slide trigger on the menu slide so that the button changes to the new "Completed" state when the variable changes to true.
I also tested with a Reference as Gerry suggested and as suggested in this tutorial and the reference showed that the variable is working correctly but the state is still not changing when I preview. I also made sure the triggers were set to happen before the slide changes thinking that might be the problem but still a no go. Your help is greatly appreciated.
PS - I attached the story file for troubleshooting. Let me know if you need any other info.
- PhilMayorSuper Hero
Hi Joe, sorry not got time to look at your file today, here is a demo I did a while ago, you need to make sure it is a slide level trigger that changes the state to completed.
Also you need to ensure your varibale change trigger is before the jump to trigger or else it never fires
here is a screenr I did as well
- LuZunigaCommunity Member
This part "Also you need to ensure your varibale change trigger is before the jump to trigger or else it never fires" really helped me. Thank you.
- JoeDeeganCommunity Member
Phil, you da man! Your attachment was a big help. The problem was that I had the "When" setting of the trigger set to "Variable Changes" instead of "Timeline starts." Screenshot below shows the trigger setup that did the trick. Thanks again for the help.
- VelvetSiprianCommunity Member
The screen shot helped me. I changed my trigger "when" to timeline starts and now my menu using variables works perfectly.
Related Content
- 4 months ago
- 2 years ago