Simon Says Switch Puzzle?

How would I create a colored switched puzzle with an actor that changes to color in an increase count where you need to repeat the sequence. (Simon Says)
It depends, do you want the actor to change to a random sequence every time?
you can use variables and tint the screen or use different sets of color of the same object that correspond to the amount of variable.
you can use switches if its correct or not.
it would be the same sequence unless you screw up and get it wrong. Starting at 1 and increasing by 1 until 8 which solves the puzzle.
there is a order switch puzzle on that which you can do the same exacly like that,
but in your case, you can use the color part =)

here is the switch puzzle tutorial found here.
unless you screw up and get it wrong
Do you mean that the sequence changes after the player gets it wrong once? Because in that case things become a bit more complicated (not too much actually, but still a bit more).
Yeah basically your playing simon says with colored switches. So lets say your on step 3.
phase 1 red,
phase 2 red, blue
phase 3 red, blue, red
if you pressed green instead of red on the third switch. the sequence would change.
That being the case you might want to generate a random sequence when that happens. There are multiple ways to do this, and depending on how you do it, you have to access the sequence in a different way.

My personal recommendation would be to assign values to different colors (e.g. red -> 0, blue -> 1, green -> 2, etc.) and use those values when generating your sequence by storing them into an array. Below you can see how the three combinations in your example are stored.
Code:
combination1 = [0];
combination2 = [0, 1];
combination3 = [0, 1, 0];

Doing it this way means that if you have to add one extra step to the sequence you can just add a random (or fixed, up to you) value after the last one in the array (you can use the push method to do that), if, on the other hand, you have to reset the whole combination, you can just start from the first index of the array once again. It is not important to reset the array, just start overwriting values from the starting index and store the current sequence length into a variable.

Code:
// In this code my sequence is going to have 5 steps in total
var mySequence = [0, 1, 0, 2, 2];
var sequenceLength = 1;

This tells me that I only have to check up to "sequenceLength" elements from "mySequence". If anything goes wrong, you can just generate new elements for your sequence using this code:
Code:
var i = 0;
for (i = 0; i < sequenceLength; i++) {
  mySequence[i] = Math.randomInt(number_of_colors_here);
}

As you can see I am not changing the whole sequence as there is no need to do it. After all, the player does not know what comes next so what is the point in changing what he/she does not know yet?

The last step is to check if the switch that the player activated is the right one. You can do it by simply checking if the value for that switch color is the same as the value stored in the current position in the sequence (this also means that you have to store the current position in a variable).

Code:
// The red switch (code for red is 0) should include something like this
if (mySequence[currentPosition] == 0) {
  currentPosition += 1;
}
else {
  // Reset the array
}

At the end of each switch event you can call the same common event (or copy/paste the same sequence of commands) to check if the player successfully completed the sequence. You can the either increase the sequence length or do something else.

Code:
if (currentPosition == sequenceLength) {
  if (sequenceLength == mySequence.length) {
    // Sequence completed! Reward the player
  }
  else {
    // Increase the current sequence length and reset the position counter
    currentPosition = 0;
    sequenceLength += 1;
  }
}

All this is something that you can do using script calls (the ones above are just examples and are not going to work in script calls because they use local variables). As a matter of fact, in the MV Script Call list how to store arrays in a game variable is already explained. Changing the value of the current sequence length and sequence position is something that you can do with a simple Control Variables event command, and checking if the sequence is completed or not is something that you can do with simple Conditional Branch event command. You should have all the necessary information to proceed right now, just remember to use the correct variable name instead of using the placeholders in my script.

Original thread: https://forums.rpgmakerweb.com/threads/simon-says-switch-puzzle.112902/