What I need is to detect that the player has closed the container (Tab) in the UI.
So I put an Event OnClose() with a RemoveAllItems() in the script. It does compile but does not remove the items. Maybe RemoveAllItems() is not working?
Is OnClose() fired when the container is closed (with Tab in the UI)? What is considered "closed". I have a suspicion that the container is not closed once activated, just doing Tab to close the container in the UI maybe does not close the container.
I just realized I may need to put a DebugText in the OnClose() to see if it is firing. Where does the DebugText output go to? I'm going to try this now. I'll be back later if anyone has any info or good ideas.
[EDIT] Figured out Debug - Thanks Cipscis. I'm lazy, I just needed to look up Debug on the WIKI - it's documented there.
[EDIT] OnClose() does not fire when the bag is closed by the player in the UI. So how do I detect when the player closes the bag?
[EDIT] Duh...! I think OnClose() is for doors closing, not for objects closing. So, OnClose() won't do anything for a container.
There is a clumsy workaround: Put an object (permanently) in the bag named something like "_empty the bag_", taking that object would cause the bag to empty and that special object would be placed back into the bag. Clumsy and dirty, so I'd like a better solution if possible.
