Sliders with motion paths going backwards

Hello! Newbie here. 

I was hoping this wonderful community could give me some advice. I want a slider to dictate the movement of an object, but each tick on the slider representing a different position along a path. I also want to be able to move the slider backwards and the object move backwards along a slider.

I've tried a few tutorials, such as the one here (with using a slider instead of buttons):

https://www.youtube.com/watch?list=PLREIddjFrT7XnAVRiZ3vu-USPoo3v7ufL&v=QTL9sKayW0g 

But when you move the slider backwards, the object moves out of the frame.

I attached a picture that hopefully describes what I'm trying to accomplish. Thank you in advance for you help!

9 Replies
Steph C

Hi Walt, thank you for the response. Yes, I would like them to move. I essentially want to do a cell signalling pathway (similar to the one attached) and the slider control the protein moving in the cell and binding with others. I guess I could do it another way (objects disappear and reappear like you mentioned), but I think seeing the movement and interaction would be much more engaging. T

Steph C

Walt - this is WONDERFUL! Thank you so so much!! I've been at this for 3 days, so you could imagine how relieved I am.

I've been trying to wrap my head around how you did this. If the value of the location is equal to the value of the slider, why is movement only activated when the location is one point away from the slider? For example, I understand "the L shape moves on Line Motion Path 6 when the slider variable changes to 1", but I don't understand the "and location = 2" portion. By moving the slider to position 1, doesn't the variable change to 2? How is the information that the variable was at 2 stored? I really appreciate your help in this.

Walt Hamilton

The slider can sense where it is. That is the position it just moved to.  But it cannot sense what direction it is moving. No problem for position 0 or position 2. But when the position is 1, should the object move from 0 to 1, or from 2 to 1?

That is the purpose of the variable. The variable is set only after all the motions have been done, and all the conditions have been checked. Therefore, in essence, it becomes the previous location (I should have named it that.) So the conditions really are: Move on path 1 if the location is 1 and the previous location was 0. Move on path 3 if the location is 1 and the previous location was 2.

That condition is not really needed for positions 0, and 2, but my background in programming doesn't like loose ends, and I think it is harder for other people to have to figure out what the conditions do, and then also figure out why only some of the triggers have them.