py6upouq Posted October 5, 2012 Author Share Posted October 5, 2012 (edited) Mujuiro, look at this. Still doesn't works, can u tell what's wrong with that? And if you know - plz write exact code which will workScriptname sssContainerScript01 extends ObjectReference ObjectReference Property akIdealItem Auto ObjectReference Property akNewItem Auto ObjectReference Property akContainerIn Auto ObjectReference Property akContainerOut Auto Event OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) Int givenItem = akBaseItem.GetFormID() Int rightItem = akIdealItem.GetFormID() If akSourceContainer == Game.GetPlayer() && givenItem == rightItem Int yourItemCount = akContainerIn.GetItemCount(akBaseItem) akContainerIn.RemoveItem(akBaseItem, yourItemCount) akContainerOut.AddItem(akNewItem, yourItemCount) endIf endEvent Edited October 5, 2012 by py6upouq Link to comment Share on other sites More sharing options...
Mujuro Posted October 5, 2012 Share Posted October 5, 2012 What do you mean by it still doesn't work? Does it compile? Did you set up your properties? What steps in the script complete successfully? Also, is your akContainerIn the container the script is attached to? If so, just use Self. Link to comment Share on other sites More sharing options...
py6upouq Posted October 5, 2012 Author Share Posted October 5, 2012 What do you mean by it still doesn't work? Does it compile? Did you set up your properties? What steps in the script complete successfully? Also, is your akContainerIn the container the script is attached to? If so, just use Self.Yea, presented code compiles successfully but nothing happens when I place item(s) in container. I tried debug messages - nothing, script doesn't activates. Also I've tried to attach script on akContainerIn and other objects - nothing! Can you just make needed adjustments? Link to comment Share on other sites More sharing options...
Mujuro Posted October 5, 2012 Share Posted October 5, 2012 What do you mean by it still doesn't work? Does it compile? Did you set up your properties? What steps in the script complete successfully? Also, is your akContainerIn the container the script is attached to? If so, just use Self.Yea, presented code compiles successfully but nothing happens when I place item(s) in container. I tried debug messages - nothing, script doesn't activates. Also I've tried to attach script on akContainerIn and other objects - nothing! Can you just make needed adjustments?Without more information from you on how you set everything up, I wouldn't even know where to adjust. :P It's like writing "my car won't start, can you fix it" (and without me seeing your car, knowing if you have gas in the tank, whether you have your car keys, etc.). Why don't you start by providing the following information, and include screen captures if possible: The container that you've attached the script toThe properties you've set up on that containerThe exact script you've attached to the container, including your debug linesYour debug trace log output Link to comment Share on other sites More sharing options...
py6upouq Posted October 8, 2012 Author Share Posted October 8, 2012 SOLVED! Link to comment Share on other sites More sharing options...
Mujuro Posted October 8, 2012 Share Posted October 8, 2012 Glad you got it working :) Link to comment Share on other sites More sharing options...
Recommended Posts