How to make the door close itself when entered

How can I edit this blueprint script in Unreal Engine that will automatically close a door when entered and prevent it from being re-opened once closed?

Hey there @LonelyBox! Welcome to the community! So to put it simply you can just set the overlap end as an extra trigger for the reversing of the door. However there are two more problems. One it looks like you have a second “Enable input” where you likely wanted to Disable input. Second running a check for a door on tick is going to cause massive performance issues if you have a bunch of doors. I’d recommend to make the entire setup Event based so that you don’t have this bool being evaluated 60 times a second. However since that’s a bigger change, if you’d rather put it behind the timeline, it will still update constantly(too much) but only when the TL is moving forward or backward.

1 Like

Thank you for your assistance. With your guidance, I was able to fix my issue; and was able to implement a new feature that automatically locks the door when someone walks through it. Youre the GOAT!

Fantastic! If you can in the future I would avoid using the Tick event for literally anything you can avoid. If there’s a way to have an event/function of any sort trigger your check at key points instead of on tick it’s always better for performance. Saves you against getting less optimal habits in the future!

Got it! Have a nice day.

1 Like