Forum Discussion

HunterBlake's avatar
HunterBlake
Community Member
22 days ago
Solved

Stop Motion Paths on a Trigger

In a quiz game I created, I have trees and clouds in the background that are going by on a continuous motion path. This little game is a monkey named Bongo that is trying to get to the banana tree. He has 3 balloons and if you answer wrong you pop one. I would like to stop the trees and clouds on a trigger in the middle of their motion path. Is that possible? The reason I am struggling is because the motion paths are up to 40s long.

Things I have considered:

  • Pause the timeline when Bongo reaches the banana tree. This works, but the issue with this is that it also pauses the sounds I want to come up after the clouds and trees stop(timeline pauses on base layer). 
  • Set a variable once Bongo lands that stops the loop. The problem I am having here is that the loop is so long that it does not really stop when I want it to. It may keep going from anywhere from 1 to 39 seconds.
  • Thinking about having it just go to the next slide, but not what I wanted to really do.

Here is the review for you to look at on Review 360.

  • You can play additional audio after the timeline has been paused, as long as the triggers are executed in the correct order. For example:

    1. Pause the timeline when the animation on the banana tree completes.
    2. Set a variable (e.g., timelinePaused) to true at the same time the animation completes.
    3. Either:
      • Play additional audio when the timelinePaused variable changes to true, or
      • Show a layer (e.g., a "Congrats" layer) that contains the additional audio, triggered by the variable change.

    See the attached simple Storyline file that plays an additional sequence after all questions are completed. The most important part is to trigger the timeline pause before the variable change occurs. There are probably other ways to handle this, but without knowing your full setup, I'm essentially working blind here.

3 Replies

  • Pausing the timeline is the only way I know of. So to fix the sound issue, could you add those elements to a layer and have that layer pause the timeline?

  • HunterBlake's avatar
    HunterBlake
    Community Member

    Interesting AaronBurgessAU​! I had not thought about about putting the trees and clouds on their own layer and stopping them there. I like this answer a lot! Thanks! Now to try it! It works, but the clouds go over Bongo since he is on the base layer. Next is to move him to his own layer as well.

  • Nedim's avatar
    Nedim
    Community Member

    You can play additional audio after the timeline has been paused, as long as the triggers are executed in the correct order. For example:

    1. Pause the timeline when the animation on the banana tree completes.
    2. Set a variable (e.g., timelinePaused) to true at the same time the animation completes.
    3. Either:
      • Play additional audio when the timelinePaused variable changes to true, or
      • Show a layer (e.g., a "Congrats" layer) that contains the additional audio, triggered by the variable change.

    See the attached simple Storyline file that plays an additional sequence after all questions are completed. The most important part is to trigger the timeline pause before the variable change occurs. There are probably other ways to handle this, but without knowing your full setup, I'm essentially working blind here.