Using a trigger to change the state of an object
Jun 19, 2014
I'm having a problem with changing the state of an object.
In the attached example, four boxes show for two seconds each and disappear. I have a Boolean variable that tracks whether overall visibility should be true or false. When it's false, no boxes should appear. When it's true, only the box that corresponds to that point in the timeline should show. I use a trigger that watches when the variable changes and sets the state of each box to "normal" or "hidden."
What's strange is that at the end of the timeline when I set the state of "Rectangle 1" to normal it shows, even though the shape only existed for the first two seconds of the timeline. See below...
So my question is, why are these objects showing where they don't belong and how can I fix it? As far as I can tell, the shape should only ever be visible for those two seconds that it exists in the timeline.
Thanks for taking the time to help,
Erich
7 Replies
Hi! I confess I didn't download and look at your story file, because based on your description alone, it sounds like you may be overcomplicating your efforts. If all you want is for each of your four rectangles to appear and then disappear when designated by your timeline (as shown in your screenshot), then the timeline setting is really all you need. I don't see why you need a variable and trigger setup at all. It sounds like you're running your timeline, then processing a trigger that is forcing a rectangle to reappear, despite the timeline.
Also keep in mind that Storyline processes trigger commands from the top down in your list. That's always something to be aware of when you're triggering multiple things. Sometimes you just have to reorder your commands to ensure that Storyline processes them in the order that you want.
But based on your description, in this case it doesn't sound like you need anything more sophisticated than the timeline alone to make each rectangle appear and then disappear on cue. Then you can focus on the style of animation in which each rectangle appears and disappears, and fun things like that!
If this answer solves your problem, please mark this entry as the Verified Answer so that others will know this question has been resolved.
Hope this helps,
Andrew
I didn't explain that very well. I'm uploading another example that's closer to the result that I'm trying to achieve.
First, here is a demo:
Demo (two screens)
I want the captions to toggle between visible/invisible and still stay in sync with the audio. On the first screen, I attempt to do this by using states with the captions that listen for a variable change. On the second screen, I attempt to show/hide a layer. The problem with the solution on screen two is that the layer's timeline is paused when it's hidden and the audio gets out of sync.
Basically, I just want to toggle the visibility of these captions that are timed to audio and I can't figure out a way. I'd love to hear of any workarounds or solutions you can think up. Thanks,
Erich
Isn't there an option that you can toggle on or off that will let you decide if you want the timeline of the base layer to pause while you are other layers are active?? Try seeing if this box is checked or unchecked:
That wasn't checked, but my audio is on the base layer. So, when I check that box, the audio doesn't play.
I've tried making toggle work in Storyline, and It seems like it shouldn't be this hard. Obviously, the images turn off correctly, and the audio keeps playing, but when I turn the images back on, they appear to be completely disassociated from the timeline.
Hi,
See the attached file.
It uses markers on the time line to make things happen, like pause, in this instance. But you could use markers to show you images perhaps ?
Bruce, you just blew my mind.
I had no idea that you could use a "when timeline starts" trigger on individual objects within a timeline to control events. Is this a documented feature of Storyline or just a "cool, well that works" piece of functionality?
If anyone wants to see, here's the published version doing what I wanted it to:
Demo
I'm attaching the SL file, too. There are some crazy caveats to doing it this way.
Good luck if anyone tries to use this in the future. I'm not sure that I'm going to use it because of all the triggers involved. I did finally get it working, though, and that feels good.
This discussion is closed. You can start a new discussion or contact Articulate Support.