Yrdolf Posted December 27, 2012 Author Share Posted December 27, 2012 Hm, yes this solved the "Blocking Problem" :biggrin: but the Items still don't duplicate. I think there is something wrong that the script doesn't know to add the Items to the Chest but I don't know what. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 27, 2012 Share Posted December 27, 2012 hmm... How are you waiting the 24 hours? According to the wiki:The total wait time may longer in certain cases where the game clock jumps ahead by a large amount (i.e. fast travel). Waiting via the wait feature may be playing a factor. Try waiting by just standing there and letting time pass by. See if that has an effect. If that is indeed the case, there is a snippet from a script in the modder's resource for the dairy stuff (i.e. milking cow) that does a game time check before allowing the activation to happen. It allows you to just stand there and wait or wait using the wait feature without any oddities in time passing etc... It could be adapted to your purposes as well. Link to comment Share on other sites More sharing options...
steve40 Posted December 28, 2012 Share Posted December 28, 2012 (edited) @Yrdolf: I told you not to declare the native functions. Why have you added back all the crap that I removed from the script? :armscrossed:You have effectively overridden the parent AddItem and WaitGameTime functions with new functions that do nothing :facepalm: Other than that, you could try placing the AddItem after the second BlockActivation statement, rather than before it. ScriptName duplicateItem extends ObjectReference Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) If akBaseItem as Ingredient BlockActivation() ; don't allow any more ingredients to be added or removed Utility.WaitGameTime(24) BlockActivation(false) ; can now add more ingredients or remove items from container AddItem(akBaseItem, aiItemCount, true) Else RemoveItem(akBaseItem, aiItemCount, true, akSourceContainer) ; if it is not an ingredient, return it to the player EndIf EndEvent Edited December 28, 2012 by steve40 Link to comment Share on other sites More sharing options...
Yrdolf Posted December 28, 2012 Author Share Posted December 28, 2012 (edited) Well, now I took your script and the WaitGameTime was the problem why the chest did not open anymore :rolleyes: . But now, the script don't stop with adding items to the chest. Even if I remove all the items of the chest it will add items. :confused: Is there a way to told the script to Add the Item only one time? Edit:Forget the last problem, I have solved it and now my script is complete. :wink: Thank you all for your help :thumbsup: Edited December 30, 2012 by Yrdolf Link to comment Share on other sites More sharing options...
Recommended Posts