How do you get a button action to pause a second before action

Feb 06, 2024

I'm trying to get a half second pause before a button click action. For some reason I can't get it to work. I just want to show a quick change state before a new layer shows. Any trigger ideas for me. I know this can't be hard, I just can't get it to work.

Thanks,

Nadja

4 Replies
Walt Hamilton

Use these triggers:

1 Change state of object to CustomVisitedState when user clicks object

2 Move object (any object) on motion path Pause (set the time for the pause as the time of the path, and the beginning and ending points both to the same coordinates - or refer to an object that is offstage) when user clicks [button]

3 Show Layer [Next layer] when animation Pause completes

If you are using a built-in Visited state instead of a custom state be sure you do NOT use step 1. Duplicating built-in triggers can lead to strange, hard to find, and sometimes spectacular problems.

Nadja Sherelis

Thank you for your response. I tried a motion path with same coordinates. I guess I'm not sure what you mean. Can you please show me. I'm attaching a file. On the base layer, the wheels need to be selected, then I want to show the "visited" state of the chocked illustration before it jumps to the next layer. But once the button is selelcted it immediately jumps to the next layer. I only want the visited version to show for a half second before it goes to the next layer. I don't see how to have an animation of the same coordinate with a timer to set.

I appreciate your help.

Thanks,

Nadja

Walt Hamilton

I’m not in a place where I can open SL, but you can do it.

When you create the motion path, select the start point and read the X and Y coordinates. Select the end point and set its X and Y to the same numbers.  That way it doesn’t move, but thinks it does.

Or if you prefer, you can create an object that is off the stage. Then it doesn’t matter how long its path is.

Either way, set the duration to half a second (or however long you want to wait.)

Delete the “Show layer when user clicks [wheel]”. That is what is causing it to jump. Replace it with “Move object [the one with the motion path, not the wheel] on motion path when user clicks wheel”.

Create a new trigger: “Show layer when motion path completes”.

The way it works is that the learner clicks the wheel. That click moves the object. When the move is completed, the path shows the layer, giving the illusion of a pause. Remember, this is a visual medium. Nothing has to do what you want, it only has to appear like it does it. In this case, the click doesn’t actually have a delay. It only appears to.