shavkacagarikia Posted June 6, 2017 Share Posted June 6, 2017 (edited) My mistake, change myContainer type from Container to ObjectReference and point it to your container which should be already placed in the cell Edited June 6, 2017 by shavkacagarikia Link to comment Share on other sites More sharing options...
stonefisher Posted June 6, 2017 Author Share Posted June 6, 2017 I'm confused, where am I meant to say what the form list and container are? Link to comment Share on other sites More sharing options...
shavkacagarikia Posted June 6, 2017 Share Posted June 6, 2017 You should fill them in the properties of the script. Link to comment Share on other sites More sharing options...
stonefisher Posted June 6, 2017 Author Share Posted June 6, 2017 Back to creation kit .com I shall have a rudimentary bad understanding by the end of this. Link to comment Share on other sites More sharing options...
stonefisher Posted June 6, 2017 Author Share Posted June 6, 2017 Scriptname CaDW_Drop_WW extends ObjectReference Furniture property pCaDW_FO4_co_Tool_PortableWeaponsWorkbenchGround auto const MiscObject property pCaDW_FO4_co_Tool_PortableWeaponsWorkbenchInventory auto const ObjectReference property CaDW_RPWW_Container auto FormList property CaDW_RPWW_ItemFilter auto ObjectReference workbenchRef ObjectReference MyContainer FormList MyFormList Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if (!akNewContainer && akOldContainer == game.getPlayer()) self.disable() workbenchRef = self.placeAtMe(pCaDW_FO4_co_Tool_PortableWeaponsWorkbenchGround) workbenchRef.MoveToNearestNavmeshLocation() workbenchRef.SetAngle(0.0, 0.0, workbenchRef.getAngleZ()) RegisterForRemoteEvent(game.getplayer(), "OnGetUp") RegisterForRemoteEvent(workbenchRef, "OnActivate") utility.wait(0.5) self.delete() endif endEvent Event ObjectReference.OnActivate(ObjectReference akSender, ObjectReference akActionRef) if (akSender == workbenchRef && akActionRef == game.getplayer()) Game.GetPlayer().RemoveItem(MyFormlist, -1, true, MyContainer) UnregisterForRemoteEvent(workbenchRef, "OnActivate") endif EndEvent Event Actor.OnGetUp(Actor sender, ObjectReference akFurniture) if (sender == game.getplayer() && akFurniture == workbenchRef) utility.wait(1.0) workbenchRef.disable() game.getplayer().addItem(self) MyContainer.RemoveItem(MyFormlist, -1, true, game.getplayer()) utility.wait(0.2) workbenchRef.delete() UnregisterForRemoteEvent(game.getplayer(), "OnGetUp") endif endEvent hmm dunno what i did wrong,nothing got sucked away. I have made a formlist with all construction and junk listed and I put a chest in qasmoke. Link to comment Share on other sites More sharing options...
shavkacagarikia Posted June 6, 2017 Share Posted June 6, 2017 Have you filled MyFormlist and MyContainer properties? You should point MyFormlist to your made formlist of junks and point MyContainer to the reference of your Container in qasmoke cell. Link to comment Share on other sites More sharing options...
stonefisher Posted June 6, 2017 Author Share Posted June 6, 2017 So the bit i added to the top of the script is not needed? I filled in properties when i added the scripts. Do I have to add the to all items or something? Link to comment Share on other sites More sharing options...
shavkacagarikia Posted June 6, 2017 Share Posted June 6, 2017 Ok, you did right try this: Scriptname CaDW_Drop_WW extends ObjectReference Furniture property pCaDW_FO4_co_Tool_PortableWeaponsWorkbenchGround auto const MiscObject property pCaDW_FO4_co_Tool_PortableWeaponsWorkbenchInventory auto const ObjectReference property CaDW_RPWW_Container auto FormList property CaDW_RPWW_ItemFilter auto ObjectReference workbenchRef Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if (!akNewContainer && akOldContainer == game.getPlayer()) self.disable() workbenchRef = self.placeAtMe(pCaDW_FO4_co_Tool_PortableWeaponsWorkbenchGround) workbenchRef.MoveToNearestNavmeshLocation() workbenchRef.SetAngle(0.0, 0.0, workbenchRef.getAngleZ()) RegisterForRemoteEvent(game.getplayer(), "OnGetUp") RegisterForRemoteEvent(workbenchRef, "OnActivate") utility.wait(0.5) self.delete() endif endEvent Event ObjectReference.OnActivate(ObjectReference akSender, ObjectReference akActionRef) if (akSender == workbenchRef && akActionRef == game.getplayer()) Game.GetPlayer().RemoveItem(CaDW_RPWW_ItemFilter, -1, true, CaDW_RPWW_Container) UnregisterForRemoteEvent(workbenchRef, "OnActivate") endif EndEvent Event Actor.OnGetUp(Actor sender, ObjectReference akFurniture) if (sender == game.getplayer() && akFurniture == workbenchRef) utility.wait(1.0) workbenchRef.disable() game.getplayer().addItem(self) CaDW_RPWW_Container.RemoveItem(CaDW_RPWW_ItemFilter, -1, true, game.getplayer()) utility.wait(0.2) workbenchRef.delete() UnregisterForRemoteEvent(game.getplayer(), "OnGetUp") endif endEvent Link to comment Share on other sites More sharing options...
stonefisher Posted June 6, 2017 Author Share Posted June 6, 2017 VICTORY! :) :) :) It works flawlessly and fast. Now I just got to finish the models and merge it with my mod and I can make an update and also release it as a stand alone mod. Thank you for the help shavkacagarikia. It was very much appreciated. Link to comment Share on other sites More sharing options...
shavkacagarikia Posted June 7, 2017 Share Posted June 7, 2017 You are welcome. Link to comment Share on other sites More sharing options...
Recommended Posts