acomp_inventory is an ActorComponent that holds an array of custom actors(items) and an int so far. but u cant pass instances in the viewport so an array of actors cannot be passed in the viewport.
last night i decided to slipt the chest.
one half is just made for placement in an actor viewport as a component. it takes in all the information that the premade chest actor holds thru parent actors details
one half is an actor that spawns using the components data at runtime.
i came up with a system that is modular with matching pairs for every premade variant of the “props” (basically actors that do something)
so i have
smcomp_propComponent (parent class static mesh component) goes in my level actor’s viewport. can set its info in its detail defaults.
and its pair is
act_prop (parent class actor) spawns at runtime. sounds redundant but it goes with my existing map level system. i can just pass smcomp_prop to it after spawning and it builds the prop. i chose that path to reduce memory as it throws away smcomp_prop after reading it.
so of course there’s propComponent_chest/prop_chest but theres also propComponent_custom/prop_custom where its booleans and matching variables for all the possible components and so i have modular prop at level design. looking at staticMesh and staticMeshComponent gave me the idea.
i tested taking a prop_chest casting it to a act_prop(the parent of chest)storing it in a variable then casting it back to a prop_chest and it retained all its original data. so is that stable? am i right to assume then it passed the reference to the original thru the 2 casts?