I need to do a sequence logic, help me!!

Hello guys.

I want to do a sequence logic (I don’t know how i canna say), so i wanna for example to do a touch sequence X Y Z and when i touch or click on the letter Y without touch before on letter X the actor (player) take damage (destroy actor) and so on.

I’m so sorry for my english that is not so good yet.

I wait for any help, and right now, thanks.

Make an Integer Variable, “LetterTouched” and a Boolean Array Variable, “LettersTouched”. Give it 3 elements in the array. On a touched letter event, set the appropriate index in the array for the letter touched to True and set the LetterTouched according to the letter that is touched, “X” would set it to 0, “Y” would set it to 1, “Z” would set it to 2.
For Loop the LettersTouched array according to the letter that is touched. Branch and check, if False do the destruction routine.

For Loop will have the LetterTouched fed into the max loop iteration.