Order of objects puzzle - with pressing key

Hi! I have a little question for you guys.
How I can store the order that a player have pressed a button on a trigger box and then check if it’s the correct order or the wrong one.
This is what I have done.

What I have in mind: If a player press a key on a series of objects, in the right order, the material will change and a door will open, otherwise if the order is bad, something will happen.

Please help me guys. :slight_smile:

The material change works… but I don’t know how to continue :frowning:

Here is the blueprint that I’ve done so far:

(The right order posted by anonymous | blueprintUE | PasteBin For Unreal Engine)

Hey @wdAMf1517!

So what you can do: use a “String” Variable. Leave it empty by default. Let’s call it “Input Code”.

Then do something like this:


Basically, we’re adding another number with each button press, then comparing it to the good code once the max inputs is reached by converting it to an Integer.

You should do this for each button, giving each button it’s own number to append to the string. :slight_smile:

1 Like

Thank you a lot! <3

1 Like