So, first off, I’d like to mention that I’m fairly new to the whole Unreal Engine and game design in general, but I’m trying to learn and study as much as I can so far. So, all I’m really attempting to do is create a custom door for the player to be able to open with a press of the button. So far, I’ve created a dungeon-like door with Geometry Boxes and Cylinders, applied some Materials to them, and grouped them together. What I’m attempting to do now is create a blueprint for this door so that I can attach a trigger box to it for player interaction. But, I can’t really figure out how to do this, or figure out another solution. Any help, please?
you have wide variety of choices my friend . More than I have listed …
For sliding door
This series is probably a little new but has a video on keycard system
you can always do the following steps:
- Create new blueprint, and choose it of type “Actor”
- Open the new blueprint, and from the top left corner, at the components section, add two components, a.StaticMesh, and b.TriggerBox
- Arrange them as you want, but make sure the trigger box, is covering the door, and few more cm around, i mean, it covers the area where the player is permitted to open it. And don’t forget to set the door mesh to the static mesh component.
- Within the trigger, you can add OnBeginOverlap event, this could be found at the right panel (Detailas panel) when you select the trigger component.
- At the logic for this, you can just drag a line from the overlap node (from other actor) and do a node called (Cast To XXXX) where XXXX is the name of the character blueprint. And then check if it is true, then you do whatever door open you wanna do.
- Now this will open the door whenever the palyer comes near to the door, which is good, but not what you need. So in order to do exactly what you want.
- In the player blueprint, add a variable type of Bool, and lets call it, doorKeyPressed. And add a node for the key “E”, and when it is pressed set the bool to true, and when it is released, set the bool to false.
- Now, back again to the door, and go to the cast thing you did at step , and after the case, you get the value of that new bool from the cast node, and do open the door only if it is true.
Hope it was clear.