Lexluckyluke Posted May 8, 2017 Share Posted May 8, 2017 hi everybody context : to carry other items (scrolls potions food etcc) the player need a bag (a misc item ) in his inventory the script i want to do is when player drop the bag, all filtered items in player inventory goes into a hidden chest in qasmokewhen player pick the bag, all items from the hidden chest in qasmoke come back to player inventory problem : ObjectReference to the hidden chest (hiddenbag) is not working, the game don't find the reference at run time(no compile errors)its cause items are not transfered into specified container, and losted .... script code : Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) Form playerbag = portablebag as Form if( akBaseItem == playerbag ) Debug.MessageBox("reference to the hidden bag : " + hiddenplayerbag ) ; <----- print none ! Int iFormIndex = ply.GetNumItems() While ( iFormIndex > 0 ) iFormIndex -= 1 Form kForm = ply.GetNthForm(iFormIndex) int typ = kForm.GetType() If ( typ == 30 || typ == 32 || typ == 23 || typ == 27 || typ == 46) ply.RemoveItem(kForm,ply.GetItemCount(kForm), true, hiddenplayerbag) EndIf EndWhile EndIf endEvent a picture of the creation Kit filling reference : thanks for your future responses :smile: Link to comment Share on other sites More sharing options...
foamyesque Posted May 8, 2017 Share Posted May 8, 2017 I suspect your problem is that the bag isn't loaded. Try going into QASmoke, opening it manually, then running your script. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted May 8, 2017 Share Posted May 8, 2017 I made something similar to what you are wanting to do a long, long time ago. Feel free to take a look at it. It is by no means perfect as I've since learned a few additional things, but it may still be helpful.http://www.nexusmods.com/skyrim/mods/27326/? Link to comment Share on other sites More sharing options...
lofgren Posted May 9, 2017 Share Posted May 9, 2017 I suspect your problem is that the bag isn't loaded. Try going into QASmoke, opening it manually, then running your script. Another option would be to add it to your quest as an alias. (However, to be honest, I was under the impression that adding to a script as an object reference had the same effect as making it an alias.) Link to comment Share on other sites More sharing options...
Lexluckyluke Posted May 14, 2017 Author Share Posted May 14, 2017 (edited) okay, its was on the CK who don't save filled references ....thanks for all of your response, my mod is almost done, I made something similar to what you are wanting to do a long, long time ago.http://www.nexusmods.com/skyrim/mods/27326/? i don't use your script source, but this give me nice ideas, Also , someone can can tell me if i can ask for beta testers ?if you want to test it tell me Edited May 14, 2017 by Lexluckyluke Link to comment Share on other sites More sharing options...
Recommended Posts