[RMMV] SCRIPT CALL TO CHECK # OF ITEMS - SOLVED

Posts

Pages: 1
I am trying to make a battle system which relies heavily on crafting items in the middle of the battle. I want to display the # of items in a hud using SRD's HUD MAKER.

Is there a simple javascript call I can use to get the # of a certain item in my inventory?

I am NOT looking to assign the # to a variable, because that won't work well with HUD MAKER and my alchemy battle system.

Thanks
You can copy it from the event command for game data:
Game_Interpreter.prototype.gameDataOperand = function(type, param1, param2) {
    switch (type) {
    case 0:  // Item
        return $gameParty.numItems($dataItems[param1]);
    case 1:  // Weapon
        return $gameParty.numItems($dataWeapons[param1]);
    case 2:  // Armor
        return $gameParty.numItems($dataArmors[param1]);
    case 3:  // Actor


So, for a normal item, the script call is "$gameParty.numItems($dataItems);", where param1 is the ID of the item in the database.
Pages: 1