So I want to have a door that needs a key to be opened.
I could make a general door blueprint which asks for a specific key item in order to open that door.
But that wouldn’t be very reusable and that’s what we want to go for in the end right?
So I thought “I can make the required item an Actor and then ask if the item implements a specific interface.” but this means I would still have to cast the item to the desired key to check if the player actually have the required item. This is not very efficient and tedious to implement.
I tried making the required item an Interface but of course that didn’t work either. So I was wondering if I could make the required actor (as in, the constructor like a property) be an actor that implements a specific interface (I_Inventory)?