The order that a player selects objects

How do I program my game so that if a player touches object 1, then object 2, then object 3 in the correct order then the game will say in a text box that he won. I’ll have 10 different objects and if the player touches object 1, then object 2, then object 3 he wins, if they touch object 4, then 5, then 6 he gets another message, etc.

maybe you can try, if player touches object 1: add “A” to Text Variable(PlayerInput), if object 2 is touched add “B” to Text Variable(PlayerInput) and so on for the objects. Create a Text Variable(WinningCondition)= ABCD
Then compare If Text Variable(WinningCondition)=Text Variable(PlayerInput)

Does anyone have any other ideas?

@Floki204’s answer should work.

You’ll also need to add a create variable that counts the number of clicks. After the 3rd click reset the number and check the two strings if they match or not.

Can you be more specific? Is it going to be 1 match at a time or several possible sequences? Is it like a keypad where you click 3 objects and then click a button to check it? Or is it more fluid where if the sequence is “123” the player can click objects “4123” and it will detect the sequence without having to click a submit type button?

Thank you. I set it so that each object clicked would add a number to a text box, using “add to” from the change a text variable option, then when a player clicks submit it checks to see if the correct sequence was submitted.

Thank you. I set it so that each object clicked would add a number to a text box, using “add to” from the change a text variable option, then when a player clicks submit it checks to see if the correct sequence was submitted. Then I made an object that when touched would clear the previous entry; which just set the same text box to nothing by setting it to two quotations with nothing between them.