openmw.org

Scripting problem: RemoveItem

Scripting problem: RemoveItem

Posted: 29 Jan 2018, 23:45

by erretel

I'm not sure if this go here or in the general discussion, since I'm not sure the problem is with OpenMW, Morrowind itself or just my lousy scripting.
Anyway, I'm trying to make an alternate Levelling Up mod, and it's working surprisingly well despite how surprisingly limited morrowind's scripting is. To put it quickly, you have those Experience Shards you can use on yourself to open a menu, from there you can spend them to increase whatever skill you want.
The issue is that I can't seem to be able to remove the Experience Shards themselves.
If I try to remove any amount from the script attached to the Experience Shards themselves it gets weird and buggy, which is kinda expected.
So I decide to use a global script. From the script attached to Experience Shard I'd try to activate a global script, which would then RemoveItem an amount (just 1 for testing) Experience Shard from the player inventory. If I do it this way, the global script fail to remove any ExpShrd at all and the ExpShrd themselves stop working (even if I load a previous save, I need to restart OpenMW).
Here are the scripts.