Go to a specific frame after clicking 2 or more objects

Hello all,

Complete newbie here, but I certainly find Wick very interesting. Thanks to the developers of this amazing tool.

I am building a simple emulator with Wick. I need to go to a specific frame on the timeline only when 2 or more objects are clicked in a very specific sequence.

Any help in how I can do this in Wick?

Thank you.

1 Like

Could you not make a bool for each object
then have it toggle to true after being clicked?

@colorsCrimsonTears Great intuition. I’ve put together a project that demonstrates that.

ButtonsInOrder.wick (47.0 KB)

So there are two booleans (variables that are true/false) which are stored in the project. You can see these on frame #1. I store them in the project so they can be accessed anywhere.

project.firstButtonPressed = false;
project.secondPressedAfterFirst = false;

Next, I have a mouseClick event on button1 which sets “firstButtonPressed” to true when the #1 is clicked.

Last, I have a mouseClick event on button2 which only sets “secondPressedAfterFirst” to true if “firstButtonPressed” is already true!

if (project.firstButtonPressed) {
    project.secondPressedAfterFirst = true;
    gotoAndStop(2);
}

Let me know if you have any questions!

1 Like

Thank you @colorsCrimsonTears and @Luxapodular. This worked perfectly.

1 Like