Hello Unreal Family!
I am newer to the development side of the house so please forgive my ignorance. I have searched for days to try to find an answer to my question but, I came up short. So, I decided to post here hoping to find the much needed salvation I am looking for!
I do not have any code to back up my question. It is more of a theory at this point in my development. I’ve made levels before (many years ago) and I always took the long and pain staking way to achieve my goal (because I didn’t really know/understand how to code properly). I am trying to completely change that way of thinking and actually code more and design less. So, with that said, here is my question…
Lets say I am making a game and I have a basic door (with door frame) Blueprint. I have it coded in a timeline to open when activated. All fine and good there. However, I’d like to use this Blueprint of the door for numerous purposes without making a separate blueprint for each purpose. For example:
As a locked door in hallways - For aesthetic purposes, you can’t have a hallway without any doors in it! I would like to place multiple instances of this door going down a hallway and have the door not function/open at all, but if the user were to try to open this door, they would get a sound effect of a locked door and an audio cue that says “This door is jammed and wont open.”.
As a functioning locked door in a room - There is a key in the room with this locked door that you have to locate. If you try to open the door (without the key in your inventory), you would get a sound effect of a locked door and an audio cue that says “This door is locked. Maybe there is a key around here.”. Once you find the key (it is placed in your inventory) and you are able to use the key on this locked door and gain entry and progress through the level.
As an automatically opening door - Through code and triggers, this door opens automatically once an event happens (timed event or BeginOverlap event, etc).
One main caveat to this game is that the entire level is procedurally generated.
So, with all of the above being said, is it possible to utilize one blueprint of the door to achieve all 3 functions or will I have to create 3 separate blueprints of the same door and just code each function separately on each instance of the door blueprint?
I apologize if my question doesn’t make sense. Please let me know and I will try my best to further explain it! Thank you all in advance. I’ve been creeping around the forums for a while now, and everyone really seems helpful and understanding!