I know this has been discussed. But there are some open questions, inclucing a fully working version
1st:
‘Event begin play’ executes the ‘default inventory’ well. the items are inside the crafted crate.
2nd:
none of the other Events seem to work, as the items do not respawn on eighter pressing E or checking the inventory.
3rd:
it seems impossible to Override the Quantity or Stack Size of Items Spawned.
If you spawn a Thatch Roof you’ll get 1 Item, if you spawn Gasoline you’ll get 5 Gasoline Items.
Is it possible to overall override that variable (Quantity and Stacksize) which comes from their original BP?
the on play event is working, yes. but none of the interactive ones… that’s ok for now. EDIT: i forgot to enable input…
that would be so great! i can NOT find this function. i searched the right click box in the graph of the object BP and inventory BP. Neighter in the event graph, nor in the construction script.
where would i find this problem solving function???
@Davetiger:
thank you that seems very promising. it is possible to set Quantity like that! but i could not add a second item class. i thought i could just chain these “new item” nodes, but it only considers the first one. @Nav0081:
that’s exactly what i do in my first screenshot. it works, but it is VERY uncomfortable if you want to have a stack of 100 items per class…
Let me help you figure this out - it’s not possible. The current way inventory works - you can’t have inventory INSIDE inventory. The item in your “inventory” is not an actual structure. So it doesn’t hold anything. You’re working in a task of futility. Anything you pick up will turn into just a picture in your inventory. It’s the limitation of the Developer Design of inventory. I’d love to have crafted a tiny box I could store things in while it’s IN my inventory, but alas - it’s not going to happen. At least not yet. Not the way we’d approach it normally.
Not exactly sure what you’re saying at the top. You want a spawnable crate with whatever you specify inside but need to do it in code? I do this for my castle mod and have a test box that I can spawn via admin command that has 4-5 of everything in my mod. Doing it this way means that each item you add to that array equals 1 item. For a stack of ten somethings you will need ten entries for that item. You don’t need an additional engram entry just add an additional structure entry for the boxbp and you can spawn them without players having access or you can use the engram like normal. You can copy and paste the storage box to do this. You can pretty much add an inventory to anything and put whatever you want inside when it spawn using that Default Inventory. I made random care packages spawn on my test server doing something like this.
Hi guys, where i can change the item quality inside the storage box and when i add ammo, the default are 10 ammo, how do i change it to another value ? thanks
all i can say is: the way i use the begin play event in the screenshot a few posts earlier, makes the event run everytime the game is started.
It would be GREAT to have an event which is only called when the structure is placed…
i saw a “do once” node in the graph, but did not have any luck with it.
I know this is an older post, but what about “Event on Spawning In”? Would that work? It’s a 1 time event right?
NVM, can’t get that node on a storagebox bp. There is however a “On Shooter Character Spawned” node in the primalinventory. Maybe that?