Spawning storage crates with items inside?

Is there a way to spawn storage crates with items inside? Possibly in the level blueprint? I’m making a DayZ inspired map and need a way to generate loot crates in my buildings. Thanks.

Nobody knows how to do this?

yep.

you’ll have to make seprate chests however to contain items, I don’t see any ‘random’ way of stocking crates, possibly using the scripting side.

to add random things to chests, in the primalinventory for the chest you want to contain items, go down to ‘cheat Inventory Items’ and add them in there, the items will be added to the container just like they are added to the player in the test environment.

Thanks caleb68, I managed to make it work through some trial and error.

First I duplicated the storage box BP, then I made this inside its event graph. It spawns either wood+thatch, stone+flint, or fiber+fiber (The items appear to be in stacks of 15). Then after 10-15 minutes it spawns another box in its place and destroys itself.
The only drawback is players can’t use it to store items, since it destroys itself and respawns.
Here is my BP:
eddd92ca9452f7fe95cddb5aa34bc480a84d1760.jpeg

hrm… spawn / delete order?

just a thought here but… could you spawn the new box with a placement offset say -1000 y (to put it under everything) then move the items to the new container before destroying the old container, after that adjust the offset (+1000) to move it to the proper position?

Not sure if your having the same issues as I with loot replication but its a good idea to test in the editor with 2 players and print string on the random int to make sure both server and clients get the same number.

hi
i’m also trying to create a craftable crate with already some items in it.
first it is quite easy to add items on PrimalInventoryBP. (Default inventory items)


BUT i cannot change the amount of them (quantity). e.g. having 100 wood and not just one, without just duplicating the items in the list. that’s not comfortable if you have about 20 items 20 times… that would be a long and ugly list to edit…
ALSO i tried to get the event when the player opens the inventory to respawn those items inside.
any help please?

hi
i tried that again. and it works. but only once. how can i make it spawn every ten seconds? looping? timer?
a235cd9f367816e1006b09819424750fc1925ce2.jpeg