Jump to content

Dropping All items from a Actor


ajs52698

Recommended Posts

You're probably going to need to use DropFirstObject() and iterate over and over until all inventory is dropped.

 

While it's easy to code this, and seemingly stupid why you can't get a container's entire inventory or drop it all on the ground, there is a huge 'gotcha' to consider.

 

-DropFirstObject() drops singles from a stack until it's exhausted, not stacks.

-I fully expect if I tried to drop my level 107 character's entire inventory on the ground at once the game would crash. It's such a nightmare to manage it from the pipboy, can you imagine every single item on the ground?

 

My advice? Don't even try it.

 

It's much easier to spawn a chest on the ground (most likely you'd want it to be persistent), remove all the stuff from wherever into the chest (the RemoveAllItems() works great).

 

Making a function that drops someone's entire inventory on the ground is just asking for trouble, which is why there isn't a simple function to do that.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...