Need help with Motion Path with Variable Condition

Hi. I've been working on this for a couple of hours now and can't seem to get the animation for this slide working as expected. Perhaps you can help.

Here's the situation:

  • On slide 1, user selects the character they will use during the learning module. Depending on which character the user selects, the variable, "CharacterChoice" changes to 1, 2, 3, or 4. (The variable is populating as expected.)
  • On slide 2, I have all 4 characters off screen. I want ONLY the selected character to move onscreen when his or her timeline starts.
  • For example, the trigger to move "Jenny" onscreen is as follows:
    Action: Move
    Object: Jenny
    Path: Line Motion Path 1
    When: Timeline Starts
    Object: Jenny
    On Condition: CharacterChoice == Equal to 1.00
  • I have placed triggers on all the characters with their line motion path and appropriate variable value. However, all the characters move on screen no matter what the variable value is.

This is driving me crazy. I would expect that the character would move onscreen only if the CharacterChoice value equals the value set as the Condition.

What am I missing?

Thanks.

 

7 Replies
Amber Starfire

Hi Emily, sure. It's in the opening scene. I got it to work by changing the initial state of all characters to hidden, and then adding triggers to make them visible if the variable was set to the correct value. But still, that doesn't make sense to me. It seems that the animation should only occur if the condition is met.

I appreciate your advice.

Emily Ruby

Hello Amber!

I was able to get this to work for you, see attached file.

You set this Character Choice up as a number variable, so when the trigger to "adjust variable" you would need to add +1, +2, +3 or +4 and remove the variable that was set up to change with the Star shape.

Also, just for a little less triggers/variables I changed the Star shape to be added to the characters Selected state. (this can be changed back, but it makes for a lot less triggers, just for an idea)

Hope this helps!

Amber Starfire

Hi Emily, thanks for taking a look at this. I like adding the star to the state - nifty.

There are several issues with this version, and I'm not sure if I was clear about what I was trying to achieve. First, users should be able to select only one character to use during the rest of the course. With "add" it doesn't set a static variable number, so if a user clicks on characters multiple times, the variable can have almost any value. What I wanted was to control the subsequent behavior of a character throughout the module, based on a static variable value (1, 2, 3, or 4).

The slide for which I would like help is 1.2 -- If you look at the triggers on that one, you will see what I was trying to do. In essence, it doesn't seem that I should have to hide and unhide characters in order to have the condition, based on the variable, control the animation.

Emily Ruby

Hello Amber,

I see what you mean with the add number variable not working for you.

I did get the file to work properly without using the Hidden state.

Attached is the update with the variables. The one thing that was missing was the object for when timeline starts. It needs to be set at the slide 1.2 as the object:

Attached is another updated file.

Hope this helps!

Amber Starfire

Emily, that's perfect. Thank you! So, the problem was that I had action tied to the characters' own timelines, and all I needed to do was have it start with the slide. (This feels like a "duh" moment ... my only excuse being that I'm a beginner using variables in Storyline.)

Thanks for your help!

- Amber

 

Emily Ruby

Amber,

Yes that is what it was. It needed to start with the timeline and not the object itself. When i took a second look I realized it, as I didn't even notice yesterday!

I am still learning as well, and variables seem to be the most difficult to figure out!  It is nice to be able to look directly at the files and having a second set of eyes really helps too!

Glad this is going to work for you now!