Announcement

Collapse
No announcement yet.

Spawning storage crates with items inside?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    Nobody knows how to do this?

    Comment


      #3
      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.

      Comment


        #4
        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:
        Click image for larger version

Name:	Spawn Inventory.JPG
Views:	1
Size:	140.8 KB
ID:	1088015
        Last edited by Hyper2Armor; 09-22-2015, 03:31 AM.

        Comment


          #5
          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?

          Comment


            #6
            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.
            Mods: NPC Bush Peoples V6


            Comment


              #7
              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)
              Click image for larger version

Name:	invbp1.jpg
Views:	1
Size:	65.3 KB
ID:	1091006
              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?
              ______________________________
              dubCUT ARK MODS

              Comment


                #8
                hi
                i tried that again. and it works. but only once. how can i make it spawn every ten seconds? looping? timer?
                Click image for larger version

Name:	u2.jpg
Views:	1
Size:	183.5 KB
ID:	1092483
                ______________________________
                dubCUT ARK MODS

                Comment

                Working...
                X