Talk:RemoveAllItems - ObjectReference

From the CreationKit Wiki
Jump to navigation Jump to search

Quest objects don't seem to be removed from the player by this function, even if abRemoveQuestItems is set.

As far as I can see, the official Bethesda scripts use SendPlayerToJail to achieve that outcome.

Clearly, removing quest objects from the player could break quests, unless it is confined to a location which the player cannot leave without recovering those items first. Proleric 05:53, 27 April 2012 (EDT)

Ownership gets corrupted : abKeepOwnership issues[edit source]

Context : a hidden cell contains three containers. An objectreference script attached to a container in a player's home cell make it as such that when the player choses the Inventory option from its scripted menu, it RemoveAllItems from two containers in the hidden cell to the third one also in the hidden cell; then the script calls the inventory menu on that 3rd container via the Player.

  • If the hidden cell is set as public without any ownership, then using abKeepOwnership = True works ok
  • If the hidden cell's owner parameter is set to the player as well as for the three containers, then abKeepOwnership = True does not work when stackable items are involved and there is more then one such item in the container and the player removes one of these items via the inventory option (which uses RemoveAllItems). If there is only one of these stackable items in the container (e.g. 1 smilodon teeth +1 Deadra Heart +1xxxx +...), then the ownership is retained as expected, else it gets corrupted. What's really odd is that it happens even though all the ownership parameters have been set to be the same as the Actor activating the mechanism (in this case the Player).

--HawkFest (talk) 2013-02-21T13:42:03 (EST)