This is quite beginners question, but what is commonly used as parent class for pickable items/skills?
My game is planned to have around 100 usable items. Good example of one would be grappling hook, that consists of 3 PaperFlipbookComponents and some tick logic.
At the moment, grappling hook is child class of SceneComponent
that gets created upon pickup and attached to player, but it feels I am forcing components to do role that they were never meant to do. For example, I cannot use CreateDefaultSubobject
to create those 3 PaperFlipbookComponents since I am creating grappling hook “On Pickup”, aka runtime. That means using NewObject
, but that does not play well with editor.
I can attach all 100 items to the player by default, have them inactive and visibility = false, but that seems like terrible idea.