simple check for item amount?

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?
no need for any javascript, that is default eventing
1) control variable > game data > item count
2) conditional branch variable >= wanted number
I know I can go around it but I don't want to introduce yet another variable or use an existing one and risk conflicts.

I want to do it in a cleaner way and learn something in the process 🙂
I don't want to introduce yet another variable or use an existing one and risk conflicts.
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).
Hello, maybe you're looking for something like that:
Code:
$gameParty.numItems($dataItems[x]) //will return number of item with database Id x
//you can also use $dataArmors[x] or dataWeapons[x]
Exactly what I needed! Thank you, TSR!

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/