antstubell Posted October 3, 2020 Share Posted October 3, 2020 (edited) I have a dead actor with a few items I want to move to an alive actor. I thought this script should do the job. Actor Property MyActor AutoObjectReference Property OldCont01 Auto; Is dead actorObjectReference Property NewCont01 Auto; Is actorObjectReference Property OldCont02 AutoObjectReference Property NewCont02 AutoAuto State WaitingEVENT onTriggerEnter(ObjectReference akActionRef)if akActionRef == MyActorGotoState("Busy")OldCont01.RemoveAllItems(NewCont01)Debug.Notification ("Items moved")GoToState("Done")EndIfENDEVENTENDSTATE The items are removed from the dead actor's inventory but the other actor doesn't receive them. Well when pickpocketing the NPC the items that should have been moved aren't in the inventory.Confused - thought this was straight forward. EDIT Tried:OldCont01.RemoveAllItems(akActionRef)Still no luck. Edited October 3, 2020 by antstubell Link to comment Share on other sites More sharing options...
dylbill Posted October 3, 2020 Share Posted October 3, 2020 Instead of pickpocketing try using the console command OpenActorContainer 1 as pickpocketing might not show all the items the actor has. Link to comment Share on other sites More sharing options...
antstubell Posted October 3, 2020 Author Share Posted October 3, 2020 (edited) But I want the player to be able to pickpocket them. EDIT: Tried the console command - NPC does not receive the items, they just disappear. Edited October 3, 2020 by antstubell Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 3, 2020 Share Posted October 3, 2020 Why are the items on the dead actor to begin with? Are you allowing the possibility of the player looting the corpse before the NPC gets there? If not, just spawn the items inside the "living" actor's inventory as needed. Link to comment Share on other sites More sharing options...
antstubell Posted October 3, 2020 Author Share Posted October 3, 2020 (edited) Scenario: Player encounters corpse. Corpse has keys to his house, a note and another 'clue' item in his inventory. Player can obviously loot these items and if player does not do this then the 'paramedic' NPC (witch) will eventually arrive and loot the items for herself, which is a benefit to her because the 'clue' item seems to imply that she had something to do with the death. When witch NPC gets home she will lock the items away in a chest which player can lockpick if player has been smart enough to observe what is going on. The Witch's quest changes on whether the corpse has been looted and in fact it changes if she doesn't know about the dead body.1. Player encounters or not a corpse.2. Player loots corpse or not.3. Other stuff happens and witch NPC gets a note left for her to collect the body.4a. Player takes the note before witch NPC has chance to read it. Witch NPC does not go to corpse and loot it.4b. Player leaves note, witch NPC 'reads the note' (it wasn't taken by player), goes to corpse and loots it.5. If witch NPC read the note > looted the body she gets home and items are moved from her inventory to a chest. EDIT: Typos Edited October 3, 2020 by antstubell Link to comment Share on other sites More sharing options...
dylbill Posted October 3, 2020 Share Posted October 3, 2020 Are the items considered quest items? If so you have to do OldCont01.RemoveAllItems(NewCont01, false, true). If that doesn't work, you can try doing it manually with removeItem: https://www.creationkit.com/index.php?title=RemoveItem_-_ObjectReference. If that still doesn't work, then you can do removeAllItems with no container and then just use AddItem: https://www.creationkit.com/index.php?title=AddItem_-_ObjectReference, as IsHaraMeradin suggested. Link to comment Share on other sites More sharing options...
antstubell Posted October 4, 2020 Author Share Posted October 4, 2020 Not quest items currently. I was thinking that - doing the manual Remove/Additem. Tedious but maybe necessary. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 4, 2020 Share Posted October 4, 2020 Just theory throwing here...Are the items on the corpse pre-placed in the Creation Kit? If so, it might be an issue related to GetItemCount not able to count pre-placed items in a container until said container is open. The items are present but have no designated object reference until they get loaded. As such GetItemCount fails to count the # of instances and RemoveAllItems might not be able to deposit into a new container. Have you checked, for completeness sake, to see what happens if the player opens the corpse inventory but does not loot anything so that the NPC can still loot later? Do the items properly transfer then? Link to comment Share on other sites More sharing options...
antstubell Posted October 4, 2020 Author Share Posted October 4, 2020 (edited) Checking it now, be right back......... UPDATE. Well...er... you gonna think I'm a complete moron and it's true I didn't place any items in the OldContainer01 (actor) inventory.Just gonna bang my head against the wall for a while. Done with head injuries, now another question. Can I hide items in an actor's inventory? Should I prepare for more headbanging when the obvious answer is provided? Edited October 4, 2020 by antstubell Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 4, 2020 Share Posted October 4, 2020 Hmm... maybe if the item is flagged as not playable it won't show up. But then the item will never be usable by the player. Otherwise you'll have to remove the items to a container for the duration that you want them "hidden". Link to comment Share on other sites More sharing options...
Recommended Posts