Jump to content

lukasaldersley

Premium Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by lukasaldersley

  1. If you know can get the Form of the item (eg by using F4SE's GetInventoryItems Function) you could use something like ObjectReference objref = ContainerRef.DropObject(FormOfItem,1) SomeContainerRef.AddItem(objref,1,True) The first line will drop a random item with the supplied FormID on the ground (the second parameter limits it to one single item). This function will get you a ReferenceObject if you only drop one. Since you generally want the item inside the container, you can use the AddItem function to re-add the previously dropped item to a container. AddItem can work with both Forms and Refs. if you pass a Form, a new item is spawned, but if you pass a ref AND the count is set to 1, the ref will be MOVED to the container. You may or may not want to move the item back to the original container. It may be better to process the item on the floor or in a seperate container and only move the item to the original container once you're done. For a mod I am making, it is necessary to drop the item, move it to a second container and process it there, then move on to the next item. Only once every item from the original container has been processed and consequently is in the second container do I move the entire inventory of this second container back to the original container. I doubt the original author really has use for this, now that almost three years have passed, but I will leave this here for others brought to this thread by google.
×
×
  • Create New...