Forum Discussion
I don't understand the point of variables if they won't work.
I just cannot, for the life of me, figure out why Articulate would waste our time with variables when they won't work as they are supposed to. I've tried every way I can think of to get this slide and others to work with variables, and it will not work. I have the following example:
When the timeline starts on this slide (Don't bother wasting your time telling me to change it to "when the timeline ends," because I've done that too. That's another idiotic design flaw, but I digress):
-Set state of Button 1 "I'm Finished Here" to Normal
If Star1Checkmark = value True
and Star2Checkmark = value True
and Star3Checkmark = value True
and Star4Checkmark = value True
Triggers are:
When the user clicks Star 1 Hostpot
Set Star1 Checkmark to value True
Jump to *slide*
When the user clicks Star 2 Hotspot
Set Star2Checkmark to value True
Jump to *slide*
When the user clicks Star 3 Hotspot
Set Star3Checkmark to value True
Jump to *slide*
When the user clicks Star 4 Hotspot
Set Star4Checkmark to value True
Jump to *slide*
I know that it is changing the variable because I also have this variable set up to show a checkmark over each hotspot star when they click on it, and they are showing up.
Yet, when I preview and end up back at this page (by design) after they have visited all stars (and the corresponding slides), the "I'm finished here" button is not visible. I was under the impression that variables work throughout the whole project and it doesn't matter where you go after a variable is adjusted, it will stay at that value. I've had this problem with multiple variables and had to end up just using triggers with other objects being visible to get the button to show up.
Extremely annoyed that I have spent 2 hours today on these variables that should work as designed, but do not. I'm ready to uninstall this program and never think about it again.
- JohnCooper-be3cCommunity Member
Nope. Seems to work for me! (see attached Storyline file).
I've been using Storyline since version 1 and I've not had any problems with variables not working. Obviously Storyline is not a programming language so it is limited in that sense. But variables are one of the major strengths of Storyline allowing you to create all sorts of powerful interactions, games and simulations...
Perhaps if you show your example, I can help?
- DanBeeding-470dCommunity Member
It's funny, when I separate the slide/scene into a new Storyline file by themselves, it works as intended. Cool, cool, cool.....
- NedimCommunity Member
I followed your instructions and created the same scene. It worked as intended. In this case, the order in which triggers are executed is very important. I suspect you set your triggers to jump to the next slide before variables are set to True when you click on either Hotspot. See the attached screenshots.
- DanBeeding-470dCommunity Member
@Nedim: Nope. Variable and then slide change.
- PhilMayor-b4ca0Community Member
Never had an issue getting this working. Not saying it always works the first time, but when it doesn't it is always my fault. Post the slides and someone will have a look. Two possibilities are you have it set up wrong (but sounds right) or there is a bug or possibly corrupt.
Do you have slide set to resume saved state? And the trigger is on the timeline of an object instead of the slide?
Hi Dan,
Great to see the community helping you out!
Just wanted to share that you can also open a case with our support team here if you'd like us to take a look at your project file. Our support engineers can review how your slides and variables are setup so we can identify why they aren't working as expected for you. We're happy to help!
- GarthYorko-TECommunity Member
I think it may have to do with the location of these triggers:
"Set StarX Checkmark to value True"Rather than having this tied to its current location, move it to the target slide and have the Variable change when the timeline start or ends.
- PhilMayor-b4ca0Community Member
They should be timeline start not an object as setting slide to resume the object only starts once.
Sent from Outlook for iOS
This is a confidential email. Tesco may monitor and record all emails. The views expressed in this email are those of the sender and not Tesco. Tesco Stores Limited Company Number: 519500 Registered in England Registered Office: Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, AL7 1GA VAT Registration Number: GB 220 4302 31
- JohnCooper-be3cCommunity Member
Hi Dan
I take it back (I think). After a bit more investigation, I have managed to create a version that doesn't work - when I think it should work! i.e. there may be a bug...
In the first version of my test Story above, I changed the state of a Button based on a trigger linked to the start of the timeline on the base slide. If all four checkmarks were true when the slide started i.e. all four objects had been clicked - the button changed... This worked fine.
So, I tried doing what you had suggested and made the trigger to change the state of the button linked to a change in the variable CheckMark4. So I could see what was going on, I added a layer that delayed the jump to the next slide by 5 seconds when the final (fourth) object was clicked and CheckMark 4 was changed - sure enough the state of the button changed when the last object was clicked...
BUT, when I return to this slide, the button has returned to its initial state.
Hmmm?. My understanding was that, if I change the state of a button in a slide, navigate away from that slide and then return, that button shoud be in its changed state NOT back to its initial state. So I think there may be a problem - not with the way variables work - but with the way 'states' work....
Phil, I trust your judgement on this. Has the attached Story hit a bug? Or have I just got my logic wrong??
NOTE there is a 5 second delay before you jump to the next slide after you click the 4th object
- NedimCommunity Member
I'm just curious. Why would I expect a button to retain its state when I return to a slide if there is no condition to tell it to change its state other then its initial state. The variable Checkmark4 never changed again so the first trigger won't work to keep the Normal state of a button based on the "When" part. I don't see how this could be a bug if I can just set a slide to Resume saved state to make this work. It seem to be the only way for a button to keep the Normal state in this case. And it's not a workaround, it's a logic we follow all the time. Other then that I really enjoy taking a part in such a constructive conversation.
- JohnCooper-be3cCommunity Member
Hi Nedim
Thanks - of course you are absolutely correct. I had completely forgotten that I could specify whether to resume the saved state or not! As you say, it works fine with that simple change.
It worries me how I can forget features in Storyline if I don't use them for a while. As you say, it highlights to me how constructive these kind of discussions can be!
- DanBeeding-470dCommunity Member
I'm curious as to the thinking behind this resume the saved state- which I did not even know about and will have to dig around to figure out how to use this morning.
It doesn't seem intuitive to me that the state would not save, but everything else on the layer would when you return to it. For instance, all checkmarks and the audio resume from where you left off. But for some reason, the button goes back to its original state? Do I have that right?
I am a simple man, so maybe this is over my head, but that seems like a design flaw that is needlessly complicated. I'm also having trouble with multiplication of variables on another thread that I posted, and it seems like that process is needlessly complicated/convoluted as well. I like the features and things you can do with storyline, but when they are not exactly intuitive to a newer user like myself (18 months), it makes it hard to really get behind the program's use within our organization.
- PhilMayor-b4ca0Community Member
Initially, there was no setting for the resume saved state. It was automatic but didn't work well in the original storyline beta, hence our current situation.
The automatic setting is either resume or don't resume and is often decided if you have interactions built on a slide. I wonder if the selected state helps determine whether this is used, but I don't know.
When I start a project, the first thing I do is reset to initial state and when I need it to save then set to resume, I never use automatic. When debugging, automatic is one of the reasons why some things do not work as expected. When I used to do training sessions this was the first thing I showed anyone.
- WaltHamiltonSuper Hero
Phil is correct. When returning to a slide, you have three options; to return to the saved condition, to return to the initial condition, or to allow SL to decide which condition (automatic). So to Dan’s point, none of it is intuitive, all of it is by designer choice.
Initial changes everything back to its original position, and the slides runs everything again. Variables are not returned to their original values because they are not objects on the slide. They are post-it notes that are impartial, outside observers of all that is going on, and carry little bits of information from one part of the project to another. As such, they can be changed only by triggers, not by returning to the slide.
Saved leaves everything on the slide as it was when you left it, except for variables and the notification that the timeline is starting. Strangely enough, returning to the saved condition doesn’t re-run anything. It just announces that the timeline has started again. That means that any trigger that fires when the timeline starts will fire again, but objects that have changed state will be in the changed state, and triggers that depend on time cues don’t fire. See the attached file.
Automatic (as Phil says) is the worst of all possible options, because you don’t have any control over it, and it isn’t really predictable. It decides which condition to return to, based on unknown factors.