please help with Common Event/Branching Paths

Hello, I have made a common event that will randomly draw a card and give it to the player character as an item. when ever the main character talks to a certain person the event is called and the card is given to the player. Right now if the same card is drawn twice the player will have two of the same card. How can I make it so each card is only drawn once, and when the player has all the cards it stops the player from being able to draw anymore cards? This is a pic of how I set up my common event....

imageHelp.png
you need to check if the player already has the card (can be done with an additional conditional branch) and depending on the result either give the card or restart the event (go to a label at top).

Described above is a simple solution that might cause some lag (how long to draw the last missing card). To prevent that loop you would need a much more complex sequence however, and that is not worth the development time in such a case. I'm only mentioning it because you would need that different approach if you have a lot more items.

So if you try to do that with thirty or sixty cards, the lag for the last few missing will become noticable, and then you'll need to use a different approach.
thanks Andar. Im only planning to have 20 cards. so for example should I add another conditional branch under Change Items : Card1 + 1? and how should I set that branch?
you'll have to test, that might be the limit.

And no, everything you currently have in the conditional branches need to go into the else-branch of the conditional branch testing for the existance of the card in inventory, and the direct branch needs the go to label. It needs to be a nested conditional branch inside the existing

Original thread: https://forums.rpgmakerweb.com/threads/please-help-with-common-event-branching-paths.54092/