How to do collecting in chronological order?

Hello guys, this is my first post on GDevelop Forum.

So I’m making a platformer game for kids to learn the alphabet of another language. How do I make it so that for example if someone clicks “b” before “a”, they lose a life or die?

Hi, I think this is how: (Please note that lines starting with “//” are my comments)

You would need to add the letter objects to a object group (lets call it Alphabet), and two variables:

A scene number variable:
AlphabetCount: 0

A global array variable:
AlphabetArray: [
0: “a”
1: “b”
2: “c”
3: “d” … (create a child for every letter) ]

Alphabet is clicked //You should use the “Button states” extension for this condition

Sub-event 1: //This is responsible for killing the player

Condition 1:
Global text variable AlphabetArray[AlphabetCount] =/= (NOT EQUAL TO) Alphabet.ObjectName()

Action 1:
(Your action to kill the player here)

Sub-event 2: //This is triggered when the letter is guessed correctly

Condition 1:
Global text variable AlphabetArray[AlphabetCount] = (EQUAL TO)

Action of sub-event 2: //This changes the position the next clicked alphabet letter needs to be in order to not kill the player
Change the scene variable AlphabetCount add 1

so for the children of the global array, what would they be
the options are:


String, the content is the letter.

hi, could you please send a screenshot of this. thank you in advance