How to make a door close after opening?

I made the blueprints for a simple lockpick system which upon success does open the door. However after the door is opened by pressing the open door key bind “T” and succeeding lockpicking the same door does nothing and the door is stuck in an opened state and is no longer closable after it has been opened once with the lockpicking system. Here is the blueprint for my door. How do I fix it so the door can be closed after its opened with the same “T” keybind to open doors?

1 Like

I think you should be able to close it with an event just plugged in here

With a custom event plugged in where you mentioned, unfortunately nothing changes.

You have to call the event :slight_smile:

Is this what you mean? Nothing changes with this set up either.

Did you try calling it without the check?

It’s a good idea to separate the picking and the open/close.

Once you’ve picked it, you can just set a bool which allows you to open and close it.

Here is the simulation. The door is opened in it but when you press open door after its opened it gets stuck at the first branch and does not even notice the close door event.
doorcantclose6.wmv (1.7 MB)

I was assuming you were using a different trigger for the close…

Like I say, separate that picking and the door movement. The player doesn’t want to have to pick the lock after the first time.

Get rid of this

and connect this

It now opens and closes properly with the same key however it skips the lockpicking minigame regardless of “set IsLocked” being connected to the flip flop.

Could create a boolean “is picked” and place it somewhere but I dont know what im doing is simply watching youtube tutorials to set things up and not knowing how to do much on my own.

Plug in a ( different :slight_smile: ) custom event here, and remove the crossed out line

Then you can pick the lock, and all it does is set the bool.

Then, you can open and close the door :slight_smile:

I’ve done that and it still skips lockpicking and the close door custom event I just added. The new close door event is not bound to T like the open door event is with the rightmost blueprint node color blue on the third person character being the open door reference.

Nearly…

This should be ‘pick lock’

image

Once the lock is picked, you can open and close it with ‘open door’.

Ok, you want to do it all from T?

Then you need a structure like this

Ok, now the lockpicking minigame works but the door doesn’t open automatically after successful pick. The player can toggle it open after its been lockpicked manually with T and close it back with T which I suppose is what I asked for though. Perhaps I could add some kind of print string to let the player know the door has been unlocked and just leave it at that or something.

Then you can connect this again

BTW, it’s better to use ‘play’ and ‘reverse’, otherwise if you sit there pressing T the door will jump around all over the place…

I see what you mean now the door opens automatically after picked with IsLocked connected to play however once the player attempts to close the door afterward it starts the animation from the closed position and opens the door rather than closes it. If the player again presses T it will close the door however.

1 Like

Sorry, I meant here

Dont use play from start

1 Like

The door now automatically opens after being picked, and closes with proper animation upon pressing the same key. Thank you for your all your help with this!

1 Like

You’re welcome :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.