I'm trying to make a simple Simon Says game. I want to know how to check to see if the player has activated the lights in the right order. They light up first, then there are 4 volumes the player can step in to activate a light

I have a very rough semi-working version, but I wanted to see if there was a better way to handle checking if the lights are activated in order.

For example.

You can create some Quest actor that contains array or lights from level. And in this array they will be set in desired order of activation (1st light in array’s index 0, 2nd light - index 1, and so on…)

And another empty array of lights class.

Then you should make some way to get order that character activates lights. So, when character activates any light, it should call some event in Quest actor, that will add this light to 2nd lights array.

Process this until all lights set in 2nd array, then in ForLoop compare 1st and 2nd arrays.

If arrays match, quest is resolved, if not - reset 2nd array and start from the beginning.

I will try that and see if I can’t get it to work. Thank you.

I actually did it a little bit differently, but I still am trying to compare two arrays. Could you explain how to use the for each loops?