5 of item condition

hello everyone


so i'm trying to make an event that with a condition that if you have 5 of an item then its true otherwise you still need more of the item


so lets say you need 5 potion to enter this dungeon otherwise it will be to go get more


i only know how to use condition branch to make sure he got potion in the bag but i cant check if he got 5 of them


any help?
Control Variables lets you set a variable to how many of an item you are holding.  Then use the variable in a conditional branch.
Control Variables: Variable X equals to Amount of Item in Inventory


Conditional Branch


   If  Variable X is greater than or equal to 5 then


     #Do stuff


   Else


     #Tell player he needs more
Control Variables: Variable X equals to Amount of Item in Inventory


how do u do that


i have


constant


variable 


random


game data


script
It's under Game Data.

Original thread: https://forums.rpgmakerweb.com/threads/5-of-item-condition.65321/