Item Quantity Checks in Conditional Branches

I was wondering if there was any way to specify the amount of items in making a conditional branch because it seems it can only do that with gold.


For example:


Eric is tasked to get 5 apples. I set the branch to recognize that he indeed has an apple, but no specific amount. Eric can bring 1 or 9999 apples, but the game will never tell when he has 5. Meaning a player can come with less than 5, and the event will take it as 5. If there was a way to make the amount I want, like how you can with the Inn events you can make.
You need to set a variable with the amount of apples that Eric has in his inventory, then in the variable check that variables against a number (or something else).


So in the event go to control variables -> Pick a variable (name it AmountOfApples or something like that). Make sure the dot is on SET. Then click game data, then the box with the three little dots in next to it (...)


In the next popup select item at the top and choose the item you want to check a possession count next to, in this case the apples.


Then create a conditional branch, select your variable (AmountOfApples) and the put 5 in the box for the constant.


Hope that helps 🙂
Worked! Thanks much for the help ^^!
It's 2022 and this still isn't just in the editor ..

@RHachicho , please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/item-quantity-checks-in-conditional-branches.66869/