"if-else" doesn't work with motion paths

Apr 26, 2023

I was trying to make a trigger that would move an object along one motion path if a variable was true, but along a different motion path is the variable was false. 

"What a perfect opportunity to use the new 'if-else' trigger functionality!" I said to myself. 

Unfortunately, after some testing, it seems that "if-else" triggers simply don't work with motion paths. I can easily do what I want using two triggers, but it's strange and annoying that "else" doesn't work. Of course, my testing hasn't been exhaustive. 

I have attached an example. The second slide uses two triggers to achieve the effect I want. The first slide uses an "if-else" trigger and doesn't work. Can anyone see why, or am I right that "if-else" just doesn't work with motion paths?

3 Replies
Jose Tansengco

Hello Amos, 

Thanks for reaching out! 

In your first slide, the reason why the oval doesn't move up when the oval is clicked while in the down position is because it doesn't satisfy the condition that the ovalposition variable should have the value 'up'. 

In this screenshot, you'll see the ovalposition variable with a value of down after clicking on the oval a first time, which prevents it from activating the move trigger. 

The best solution here would be to have multiple triggers to account for the changing variable in your slide. 

Hope this helps!

 

Amos Sarrouy

Hi Joe, thanks a lot for taking a look at this!

I'm not sure I'm with you. You're saying that the trigger doesn't get set off at all, unless the condition is met? I may not be following what you're saying. That's not how I understood the "If-Else" logic. 

As I understand it, when the user clicks on the object the oval moves down if ovalposition = up. If ovalposition doesn't equal up, then the oval should move up. This is how the triggers work in other cases that don't use motion paths. For an example take a look at the second slide of the story file I attached below. The states change based on the variable. 

I did go back and do more testing though, and I found that everything works as I expected, but only when the user isn't clicking on the object that's moving. Take a look at the first slide in the attached story file to see what I'm talking about. 

For some reason the "else" part of the trigger doesn't activate motion paths when the object being clicked on is the object to be moved. The file I attached here should be a clearer example than the one I started with.

This seems like a bug in storyline. Do you or does anyone have any other insight?

Jose Tansengco

Hello Amos, 

I understand the points that you've raised, and I agree that they are valid. I opened a support case on your behalf so we can have our support engineers take a closer look at the logic behind the else condition in the triggers. They'll be reaching out to you shortly with their findings!