How do I get the current item gained, icon id? I have my window now displaying the item + amount you gain, but I'm unsure of how to get the icon associated with that item to display as well.
This is what I have for the gain item method. I use gameSystem variables to set the item and the amount arguments into variables which are then displayed in my window. I can't seem to figure out how to get the icon id associated with the current item gained. I've looked over the core scripts but still cannot find it. Any help or guidance will be appreciated.
Thanks :D
[doublepost=1448043358,1448042018][/doublepost]I figured it out lol. It was really simple and I would have never figured it out if I never looked at another plugin that uses this method.
All I had to do was put .iconIndex after item. So
So I will be marking this as answered and locking this thread. If for some reason you want this re-opened please report the post. Thanks.
This is what I have for the gain item method. I use gameSystem variables to set the item and the amount arguments into variables which are then displayed in my window. I can't seem to figure out how to get the icon id associated with the current item gained. I've looked over the core scripts but still cannot find it. Any help or guidance will be appreciated.
Thanks :D
JavaScript:
//--------------------------------------
// Alias Nethod: gainItem
//------------------------------------------------------------------------------
LTN.WindowPop_oldGP_gainItem = Game_Party.prototype.gainItem;
//------------------------------------------------------------------------------
Game_Party.prototype.gainItem = function(item, amount, includeEquip) {
if(LTN.Param.autoPop == 'On') {
$gameSystem._currentPop = 'Item';
$gameSystem._popTimer = 150;
$gameSystem._autoItem = item.name;
$gameSystem._autoAmount = amount;
console.log('Auto Pop Initialized');
}
$gameMap.requestRefresh();
LTN.WindowPop_oldGP_gainItem.call(this, item, amount, includeEquip);
};
All I had to do was put .iconIndex after item. So
JavaScript:
$gameSystem._autoIconID = item.iconIndex;