ajs52698 Posted September 16, 2016 Share Posted September 16, 2016 (edited) How to Title ^ Have only found one post on this and its outdated. | Edited September 16, 2016 by ajs52698 Link to comment Share on other sites More sharing options...
LoneRaptor Posted September 16, 2016 Share Posted September 16, 2016 (edited) If you just want to remove all items you can use Game.GetPlayer().RemoveAllItems() ;Game.GetPlayer() can be replaced by any actorCK wiki link, You can use the same function to move all the items to a container not sure if you can use it to drop everything on the ground. Edited September 16, 2016 by LoneRaptor Link to comment Share on other sites More sharing options...
ajs52698 Posted September 16, 2016 Author Share Posted September 16, 2016 Yea Im not looking to just straight up remove items, i need them to be dropped from the actor Link to comment Share on other sites More sharing options...
MasterMagnus Posted September 17, 2016 Share Posted September 17, 2016 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 More sharing options...
ajs52698 Posted September 17, 2016 Author Share Posted September 17, 2016 alright I guess ill have to result to that, thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts