Hi, I have just started learning the UnrealEngine and from what I have seen so far I am impressed of the many ways it can be used to create games and how user friendly it is.
I’ve replicated Hakabane’s inventory system ( Basic Item System with stacking functionality - Please Critique! - Blueprint - Epic Developer Community Forums ) and now I’m trying to continue building on it but I have run into a problem, I’m trying to pass an array-variable(which itself is a BaseItem_C variable type) from “Baseinventory” (actor blueprint) to the “MyCharacter” Blueprint to be able to, through keystrokes print the inventory.
I have tried several approaches but seem to be doing them all the wrong way since I can’t seem to access or somehow replicate the variable into the “MyCharacter” Blueprint, and would appreciate any help that would allow for this to happen
Thanks for the reply , what you said made me go back to my character BP and actually go through it again and realise that I had completely overlooked the fact that the BaseInventory was already spawned and i could use that to print the inventory variable inside, I feel really silly after spending “some” time yesterday trying to fix this x)
Again thank you for your reply
Kind Regards, J
Those classes should create reference to each other in variables (one in each), it all depends on design of your inventory system. You will need to assign the inventory to character anyway right? Most easiest way i think would be Character spawning it’s inventory, if you want to hold inventory after death of character then make player controller spawn inventory. Spawn functions returns instance of spawned object so you can set to variable, you can spawn inventory with character as owner so in inventory you can call Get Owner. Alternatively you can access character via player controller which you can get from variues nodes.