[Problem] Inventory System not wroking? AS2
well i found an inventory tutorial on this very website and had to mod it around to fit my game, so i have this function
Code:
function addToslot(item1) {
var addItem1 = _root.backpack.attachMovie(item1, item1, 1);
addItem1._x = eval("_root.backpack.itemSlot"+currentslotnum)._x;
addItem1._y = eval("_root.backpack.itemSlot"+currentslotnum)._y;
currentslotnum++;
}
so that works, but when you start the game, i did this code
Code:
_root.warriorSprite10.addToslot("starterBladeI");
and that worked, starterBladeI went to the right slot, but then when i use this code to get another weapon
Code:
_root.warriorSprite10.addToslot("shortSwordI");
the shortSwordI goes to the second slot, but the starterBladeI disappears. anyone see an obvious error?