Object Movement using states, swiping/dragging and random selection (Moving objects out of the way)

I have an idea but cannot figure out how to combine all the components that may be needed to create. I would like an object to roll through some states and land on the next state and in a specific (or approx) place on the screen, where the user swipes (or mouse drags) toward. Ultimately I would like for the user to find two like items out of a bunch scrambled throughout the screen, and allow them to move objects if they seen another one peeping out behind another one to select it.

Below is the thought process

  1. User swipes (or click-n-drags) an object towards the upper right corner (basically anywhere on the screen)
  2. The object rolls through some states (acting like it's rolling toward the destination), and ends up in that area, and lands on the next state.
  3. The user swipes (or click-n-drag) the same object and it picks up where the state left off and rolls to the next area
  4. If the object is at the end of the states is starts over.

Is there a way this can be done without Javascript? I have the states of each position and now I need to figure out the other steps. The attachment only has the states included at this point. 

Thank you for any direction someone can provide! :-) I will continue to see what I can figure out and upload new files when something is discovered.

Billi :-)

1 Reply
Mcgem Minoc

Hello Billi!

I would love to give this a shot. I have attached the same story file with the changes I did which hopefully work for you. If I understand correctly, A motion path is triggered by the user, then the state of the object changes to the next image when it reaches the endpoint, and so on.

The first trigger is to start the initial animation of the object, then change the state to the next image once the first animation completes. To initiate the succeeding animations without resetting the state of the object, I added a condition to start the next animation when the user clicks and the current state of the object.

Here's the first set of triggers I added.

Once the object completes the first motion path animation, I added these triggers with a condition. I added this condition so the object doesn't go back to the first animation.

We'll need to add a new motion path for each image state you want to use, as well as these triggers so the object can successively update states up to the last image.

Hope you can find this useful, Please let me know if you have questions.

Cheers!