Need help with complex eventing

Alright, This needs some backstory. I'm making a card game in MV, so far there is only 5 different cards and I need help with making an A.I. that randomly selects number between 1 and 5 each number being associated with a card and must do this 5 times without picking the same card twice. I have common events set for Card 1, Card 2, Card 3, Card 4 and Card 5 They work like this (The card name in this example is Hostage, it stops an enemy card from moving)

Common event Card 1: Control Variables: Card 1 Select = Random 1...5
If Card 1 select = 1
If HOSTAGE selected is OFF:
Control switches: HOSTAGE = ON
Control switches: Hostage selected = ON
else Control Variables: Card 1 Select = Random 1...5

Then that repeats 4 additional times for each card. the idea being that it will check from 1 -5 and if it picks 1 then it will check if that card has already been selected by seeing if the "HOSTAGE selected" switch is OFF... if it is OFF the card hasn't been selected and can be chosen for one of the common events. Now we get into the actual problem (Told you this was complex)
So, when you boot up the game 5 cards stack up in the middle of the screen. Each is a different picture (using show picture)Then after they stack, you draw cards 1 by 1 each picture moves downward (Move Picture) to indicate the card is being drawn and flips the card face up quickly to show the artwork so you know which card you got. So, if Common event: Card 1 has HOSTAGE selected= ON when the card flips face up to show the artwork it should show the Hostage artwork. however it's been completely glitching out I don't know what is causing it and I've looked 1000 times everything seems right to me. I can't really screen shot the event for this because it is a massive. I'm going to drop some videos and the actual game it's self in a googledrive link if anyone is willing to open it up in their RPG maker and take a look at it, maybe you guys can figure out what's happening. Event 22 is the one that's giving me problems. if there is an easier or more efficient way to do this pleassee let me know!!

Here's the link Card Game I know my events are a mess. lol
This tutorial might help you. https://forums.rpgmakerweb.com/inde...ing-cards-drawing-a-hand.141370/#post-1224727
I accidently uploaded the post before I finished writing it, it's now finished just waiting for things to upload to goolgedrive for the links. I don't think this tutorial is quite what I'm looking for because of the way the game works, however I'm deff gonna bookmark this cause I'm sure there is some stuff in here I can learn from! Thanks!! 😀
I accidently uploaded the post before I finished writing it, it's now finished just waiting for things to upload to goolgedrive for the links. I don't think this tutorial is quite what I'm looking for because of the way the game works, however I'm deff gonna bookmark this cause I'm sure there is some stuff in here I can learn from! Thanks!! 😀
Is there anything about this system that would prevent you from doing the "store cards as an array, shuffle them then get a new one by popping/shifting off the end/beginning" method?
Is there anything about this system that would prevent you from doing the "store cards as an array, shuffle them then get a new one by popping/shifting off the end/beginning" method?
I honestly wouldn't know, I don't even know what an "array" is! lool So I'm not sure. I'm sorry, I'm really in over my head here /.\ I'd suggest just taking a look at the game yourself. I don't have the knowledge to know the difference. :/
Is there anything about this system that would prevent you from doing the "store cards as an array, shuffle them then get a new one by popping/shifting off the end/beginning" method?
Reading more of the tutorial now. I see what you're talking about I think this may work!! 😀 But still take a look at the game if you want because I'm not entirely sure if that would work.
It should do, because you're not doing anything with the underlying logic of the card handling itself, you're just using a much more streamlined method to get the card randomly.
It should do, because you're not doing anything with the underlying logic of the card handling itself, you're just using a much more streamlined method to get the card randomly.
Yeah I'm gonna open a new project and just follow the tutorial and hopefully learn how to do this, it definitely seems much more efficient then what I'm doing currently. Kinda sucks that I'm gonna have to delete most of what I have now to fix it :'( but it is what it is.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-complex-eventing.145186/