I want to make a conditional branch checking for the number of items not just if the item type is in your posession.
I'm sure there's one nifty JS line for that?
I'm sure there's one nifty JS line for that?
For that reason one of the first things I do in a new project is designate the first few variables as "temp" variables. Whenever I use those variables I know that I will never store data there, they are always temporary for direct use like in these cases. That way there will never be conflicts and I always have variables to discard at the beginning of the list of variables (=easier to find later).
$gameParty.numItems($dataItems[x]) //will return number of item with database Id x
//you can also use $dataArmors[x] or dataWeapons[x]
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/simple-check-for-item-amount.119626/