I’m trying to create a version of Simon, and am having trouble figuring out how to store which buttons have been clicked in which order. Is there a simple fix for this?
I suggest you to create a variable object. Examplr red value is 1, blue 2 and so on. So repeat n times and in the repeat loop select randomly a number from 1 to 4 ( if you have four colours) . Memorize the number in a array scene variable. Then compare the the object number selected by click released with the array value.
Do you mean that I should create a “structure variable” to function as an array and then remove the children when they are clicked?
Create a structure with children. Example loop.rond1 loop.round2 … Loop…( maximum number of beep that you want to manage) .
Example in the first turn you have four beep.
Variable maximum number of beep: 4
Repeat maximum number of beep times
Generate a random number to select a colour
Turn on the correct button
Save the number into loop.rond0 ( dynamically change the round number using the incremental counter. In this case from 1 to 4
Turn off the coloured button.
Then you had shown the colours and memorized them into the loop.round array
Now compare the user action with loop.round