Creating a Correct Order For Buttons To Be Pressed?

What would you do if you wanted a different actions to be enacted when the buttons were clicked in different orders?

So you wouldn’t necessarily have a “correct” response. Instead, you would have a number of “if, then” phrases.

If buttons pressed in x order, then y.
If buttons pressed in a order, then b.

I have attached a “Phoneme Map” Hype as a “proof of concept” literacy app. I’m interested in users pressing “buttons” in a range of sequences. Each valid sequence would prompt an audio recording and/or text prompt of the word that is made up of the sequence of phonemes. This may make sense when exploring the attached Hype document.

E.g. If /b/ + /short a/ + /t/ were pressed, then “bat” audio and/or text would occur.
E.g. If /m/ + /long a/ + /l/ were pressed, then “mail” and/or “male” audio and/or text would occur.

How would I alter the code to allow for different actions to be prompted by buttons being pressed in different orders?

Phoneme-Map.zip (1.5 MB)