Help with Line Graph Motion Paths

Sep 21, 2022

In the attached story, I am attempting to build motion paths for the marker (red circle) to follow the line graph. At each of the indicated stops (blue circles), the state of a rectangle would change to provide information about the particular column. 

At a minimum, I am looking for forward movement, though it would be nice to have backward movement as well. (Marker movement forward and backward.)

I have tried creating one solid motion path, with triggers set to intersect, as well as individual motion paths with relative starting points. I have not been successful with either method. 

Was wondering if someone had any tips or even a sample file they could share where this was programmed successfully. I appreciate the help! 

1 Reply
Judy Nollet

Each move along the line graph requires a differently shaped path, so I wouldn't use relative starting points.

I suggest you have 2 separate paths for each segment: 1 going forward, and 1 going backward. (Because, alas, there's currently no way to tell the program to retreat along a given motion path...)

  • Be sure to give each path a meaningful name. For example: path1forward, path1back, path2forward, path2back, etc. This will really help when you're creating/editing triggers!

To ensure the object follows the proper path when the PREV or NEXT button is clicked, you'll need to use a variable to track the current location and triggers with conditions that determine the proper path to take.

  • Create a variable that tracks where the object is. This could be a number variable, with each position assigned a number. Or use a text variable, with each position assigned a name (e.g., at1, at2, etc.).
  • Adjust the variable's value whenever a motion path completes. For example, when path1forward completes, adjust the variable to "at2."  
  • Add triggers with conditions that move the object on a given path based on the value of the variable (i.e., the current position). For example, move the object on path2forward when the user clicks NEXT if the variable = at1.  

This post is about preventing relative paths from moving off the slide. However, it may give you some guidance for controlling paths using variables and conditions. 

And here are the User Guide articles with basic info about variables and conditions: