If/then/else funtionality
Apr 21, 2020
I'm trying to use triggers in Storyline 360 to recreate an if/then/else if/else type statement used in other programming languages to conditiionally set a variable depending on the value of another variable e.g.
if order = 2 or order = 4 then
set adjust = 2
else if order = 5 then
set adjust = 3
else
set adjust = 1
end if
In the attached file I've set the variables at 2 second intervals to see what's happening but ideally they would all be -on timeline start- (as in slide 2).
The -if- statements in the triggers appear to be being ignored as i would expect to see order=4 & adjust=2 but it displays order=4 & adjust=3
Thanks in advance.
Paul
7 Replies
Paul,
Your attachment didn't make it. You have to visit this page with a browser, or the add attachment doesn't work.
Hi Paul,
This sounds like an interesting one but looks like you forgot to attach the file you mention.
Len
Hopefully this time
This trigger was corrupted. I deleted it and recreated it, and now it works.
Thanks Walt.
Out of interest, any idea how a trigger can become corrupt and are there any teltale signs to look out for to indicate it is corrupt?
SL seems to have a lot problems with copy and paste, As a side note, if you hadn't copied the slide for your sample; if you had created it from scratch, one slide would have worked and the other not, and it would have been even more confusing.
Anyway, I always double check copied items. One time I copied triggers to another slide. On the target slide trigger list they looked fine, but when I opened them to edit them, they were blank. that was a long time ago, and might have been fixed, but I always check copied triggers.
The only telltale sign I know is that they don't work as expected :(
Thanks again Walt - good advice.
This discussion is closed. You can start a new discussion or contact Articulate Support.