Click in right order puzzle

Hello,
I have a new problem and have been trying for 5 hours now.
I have 4 sprites that need to be clicked in a certain order.
If the correct sequence has been clicked, an action should be executed.

I’ve already searched the forum for similar questions and then applied it to my example.
I don’t understand everything yet.

I have the variable Target=a,b and the variable Select=

I want when I click sprite “stern1” to be set to the variable “Select=a”. If I now click on the sprite “stern2”, the variable should say Select=a,b.

But I don’t know how it works

here is a small demo example

  1. Add the “Trigger once” condition, so the variable will only sum up once per click.

  2. Adding a then adding b will result in ab not a,b

1 Like

Thanks, that helped with another problem.
I was able to solve the main problem with the help of the debugger.
When I click on an object, it doesn’t just write “a” in the Select String but “[Array]a”.
I just had to change the “target string” from target=ab to target=[Array]ab

Hi, As @Reborn mentioned, depending on your previous events screenshot, Select should result in “ab”.
Please share a screenshot of your new events to be able to identify the problem.

1 Like

Hey.
The problem is solved. That Arrey thing was a mistake of mine.
I still had a wrong command in a sprite.
But it still worked. But now I have everything as it should be and it works.
Thank you

If you want, instead of using a counter variable, you can use this condition:

Compare two numbers: StrLength(VariableString(Select)) = 4

1 Like

Thanks, that works well and makes the code a bit leaner.
I thought there must be a function for that,
but I was too lazy to look for it, to be honest :sweat_smile:
Thank you very much

1 Like