Having a "Door locked" message when not having a key

Hello all !
That seemed so easy when I thought about it, but I can’t have a message like “The door is locked” when the player doesn’t have the good key. I have a specific key for each of my two closed door, but I would first try to have the message if the player doesn’t have any key on him.
I first created a boolean on my thirdperson character that I named “Have Key”. Then when the player pick up a key, I set it to 1. And on the locked door blueprint, I put a branch with my variable in condition. And of course it doesn’t work, I guess I’m wrong on the branch thing. The first image is the Key blueprint, and the second is for the door.

So that’s for the basic thing. And as a bonus, as I said, I have an enum for my two keys, each opening a specific door. So how could I get the “Door locked” message if I have the wrong key ?

Thanks in advance, and have a great day !

](filedata/fetch?id=1816744&d=1601384905)

Hello Arkenophas,

Can you put a print string after InputAction Interact and make sure it does fire off? I think that’s where it fails. Do you enable input when your character is close to the door?

You mean after the input interact of the door ? I just put one, and it appear when I open the door, not when I try to interact without the key. And yeah, the input is enabled as the key system is working and I can open the door.

The two whole blueprints

](filedata/fetch?id=1816788&d=1601389159)
](filedata/fetch?id=1816789&d=1601389159)

Well, I put the enable input before the “for each loop”, and I have the message now when I don’t take any key. But if I take one, it can open the other door too x)
(I should edit my posts instead of doing new ones…)

Edit : I just put the False of the last branch in the door blueprint to disable input, and now I can’t open the other door with my key. Now searching where to put the string when the player don’t have the good key.

I got it ! The problem was, in the key blueprint, that was disabling the input if the key was not right, and so preventing the player to make an input when having the wrong key (don’t know if it’s understandable x) )
So I just copy pasted the nodes that verify if the key is right or wrong before the nodes that open the door, as below (the set material is just for a feedback with a random material that says that the door is locked if the player try)
Well, at least it seem to work when I tried x) Thanks DonBusso, you’ve put me on the right tracks !

](filedata/fetch?id=1816904&d=1601402680)