Difference between revisions of "RemoveItem - ObjectReference"

280 bytes added ,  21:18, 19 September 2016
→‎Parameters: elaborated on form type handling
imported>IsharaMeradin
(Added note about how this function does not work on items inside containers that have not had their contents yet loaded by the game. Included a workaround solution.)
imported>DavidJCobb
(→‎Parameters: elaborated on form type handling)
Line 11: Line 11:


== Parameters ==
== Parameters ==
*akItemToRemove: The item (or base form) to remove from this reference's inventory. If a reference is passed, the reference is deleted once it's removed.
*akItemToRemove: The item (or other form) to remove from this reference's inventory. Different form types yield different behaviors:
**'''Item base form:''' ''aiCount'' of the item will be removed.
**'''FormList:''' ''aiCount'' of each base form in the FormList will be removed. However, if the FormList is empty, a Papyrus error will occur.
**'''ObjectReference:''' The reference will be removed from the inventory and then deleted.
*aiCount: How many references to remove.
*aiCount: How many references to remove.
**'''Default:''' 1
**'''Default:''' 1
Anonymous user