Forum Discussion
Help with States dependent on Variables
Hi,
I'm working on a quick activity to incorporate into an ILT. All I'm looking to do is have the characters on the main slide change their state to "Happy" once the appropriate slide is accessed. I've set up variables contingent upon them clicking a button from within those slides. I cannot get their states to change... any thoughts?
I didn't want to use "Visited" because I didn't like the flash of the new state showing before the new slide was accessed - silly, I know.
Open to your suggestions!
- MariaCSStaff
Hi, Laura.
Thank you for sharing your .story file!
When you use the trigger "When the variable changes", that variable has to change on the same slide as the trigger, which is not the case with your Introduction slide. Instead, I suggest changing the trigger to "When the timeline starts if the variable is True".
You also need to check the order of triggers on each one of your slides. The trigger that changes the variable to True needs to happen before the user jumps back to the initial slide, or it won't execute:
I'm attaching the edited .story file with my suggestions. Let me know if that works!
- MichaelHinzeCommunity Member
The "When variable changes" option in a trigger only applies to the slide where the change actually happens. In you case that's the scenario slide, NOT the Intro slide. You need to change the triggers on the Intro slide to Change state of Character xyz to Happy WHEN THE TIMELINE STARTS ON THIS SLIDE.
Also on the scenario slide, you need to reverse the order of trigger on the menu button so that the variables are set BEFORE you jump back to the Intro. See attached where I fixed the setup for Character 3.
- LauraWhittonCommunity Member
Thank you both! I appreciate you. I'm newer to variables, so this is so helpful :)
- LauraWhittonCommunity Member
One more silly question on these characters before I actually build out content.
The states change with the suggestions above, but the character's pose doesn't change even though the "Happy" state is a different pose/expression. The thumbs-up appears for the state, but that's it. Any ideas?
Here's the item in Review: https://360.articulate.com/review/content/454bf573-3350-4058-ad98-1b79c9df50d0/review
- MariaCSStaff
Hi, Laura.
I didn't notice that happening with my edited version above, but I can see it in your published version.
My suggestion is to recreate that state. You can do it by clicking the character, going to Edit states, and selecting the Happy state. Copy everything (Ctrl+C) and paste it (CTRL+V) in that same state.
Let me know if that works!
- LauraWhittonCommunity Member
I'll give that a try! Thank you :)