I do
So the problem was that, let's say you've got an item which does 2 things:
1) Give you +10 damage
2) Give you the ability to summon a demon (2 charges)
If you summon the demon twice (no charges left), then the item will still be in your inventory (because of the +10 damage bonus), but you cannot summon anything.
If you switch inventories, then the system will save "0 charges". In the trigger editor, 0 charges means infinite charges. This isn't right, because then you can summon infinitely many demons.
I've changed the system so the item drops (and thus is never destroyed), which solves that problem.
The next problem I had is that you can't save "null" in a hashtable (it won't overwrite the previous value, at least not for me). So I had to introduce a dummy item that functions as null, which is a roundabout way and I don't really like it, but I couldn't see another easy option (don't want to stretch the code).
New version attached
Setup:
- Copy the category "Inventory" to your map (be sure that "automatically create variables" is checked).
- In your map, place an item (any item, doesn't matter which type) on the map.
- In the trigger "Init", change the value for "set hiddenItem" to the item you just placed on the map.
- In the trigger "Switch Inventory", change the condition to your ability.
It should work then.