Activate a trigger that activate the trigger of a door

Hi everyone,

I’m not sure that many people will understand my title so here my problem:
I’m actually create a simple level in UE4 in a spaceship who will be playable and in it, I decided to lead the player to a door, but there’s no power.
He has to search for the electrical panel and activate it to restore the energy.

I create the blueprint for the door but I don’t know how to create a blueprint for the electrical panel, that will activate the BP of the door.

I’m sure it’s not complicated, when I press a key close of the electrical panel, it will change an condition in the door BP but I can’t find it.

Does anyone know this ? Thanks :slight_smile:

OK so add a onlap thing and when the player clicks a button: it gets the doors blueprint and actives a bool that when is true will make the door do what ever you want. Tell me if this works?

Thanks for the reply, I made this modification but I’m still missing something.

I add a trigger box near my electrical panel and create this blueprint:

So when the player come inside the trigger, he can press E to change the condition of the branch

Then, I create the door blueprint inside the level BP (it’s not a huge level, so I think it’s fine for now):

I think I have to import my blueprint trigger inside the BP level and "transform’ it into a condition that I will place after Press E, this way, it’ll only works when the condition is check on. But I do not know the the node that can do that.

i dont either =) but when and if i do(i may already know it) i will help more!

I thought another way to do it but, like I’m no programmer and I don’t know how to do it. Here what I think of:

  • In my trigger box, I create an
    boolean variable that I activate when
    I press a key
    I import my boolean inside the level blueprint and use it as a condition to open the door

To test it, I simply create two light with different colors and when I press E it will change the first light, active the boolean and change the 2nd light

But it doesn’t work and I hate it because it’s so simple, anyone know how to do it ? (and also import a variable from another BP ?)

ok i think i know what you mean by import: so first if you want it to be editable on a diffrent bp then turn on the editable thing, then on the bp you want it use it on you do cast to name name would be the bps name. i hope this helps

Hi,

I try but I can’t do it. I manage to link the two blueprint, but It doesn’t care where I press E.
Front of the door and in the trigger of the electrical panel, both open the door.

I can’t manage to create a condition that will “enable” the BP of the door

did you cast to the blueprint?