How to Add Conditions to States
Mar 20, 2013
Hi everyone! I'm trying to make a state on an object contigent upon the state of another object, but I'm not having any luck. The concept I'm going for is that there are two objects (Atsumi and Jane), both set up with two states: Normal and Visited. I want the user to only see the state change to visited one the second object (Jane) if the state of the first object is visited. In other words, object two (Jane) should not be able to become "visited" until object one (Atsumi) is visited. I set up my trigger as follows:
However, when I preview the slide and click object 2 (Jane) while object 1 (Atsumi) isstill in the Normal state, object 2 (Jane) changes to visited despite the condition not being met.
Any ideas on this? Help is greatly appreciated! Thanks everyone!
6 Replies
Ian,
Welcome to Heroes!
Jane will always change to Visited if she has been visited.
I think you are having that problem because in Storyline "visited" means something specific. It means "has been clicked on." So, if you use the built-in state "Visited" the built-in parameters are already there no matter what triggers you write.
I suggest you make a custom state and not call it Visited. I've attached a story file with a new state on the characters called "Hands Up." If Suits hands are up, then Red Shirt has a state change as well. See if this logic makes sense.
Thanks Meryem!
This worked well. Appreciate the help!
I have a follow up to this thread. This is the main idea we're after:
Requirements: The user cannot click on Elaine first. If the user clicks on Elaine, nothing should happen. She should not be greyed out, and the user should not be taken to slide 3. Only after clicking george and viewing slide 2 should the user be able to click Elain successfully. I've set up a variable called GeorgeExplored with a default of False, and a trigger on slide 2 to adjust the variable to True when the timeline starts. The trigger to jump to slide 3 when clicking elaine is contingent upon the variable being True. This works. So I then decided to add the same condition for the State change to Explored when the user clicks Elaine.
The problem now is that when the user return to slide 1, from either slide 2 or 3, then state of Elaine and George are set to Normal, not Explored, even though the user has clicked. I suspect this is because the timeline starts again, or something like that. I've attached the file.
Thanks!
Hi Ian,
I've uploaded it with a couple changes.
Changed the trigger for George to change to explored when the timeline starts on slide 1 if GeorgeExplored=true
Added another T/F variable for Elaine explored
I think it achieves what you were after. Let us know.
Rockin' Rebecca!
Thanks a lot! Must be something about the "when user clicks" and jumping around screens that caused the issue. Your solution is great and I'm pretty sure it will work for the project I'm working on. Really appreciate it.
Glad to hear it. Let us know, if not.
This discussion is closed. You can start a new discussion or contact Articulate Support.