#Random Card Selection
1 messages · Page 1 of 1 (latest)
Hiya! Which part do you mean by giving the players 4 random cards? Seems like you got the script down does it work or is there any errors ongoing with it? Or is there something you're stuck with?
As i dont bother to really read scripts unless theres an actual error within it
right now I'm looking at 2 problems, one where the same cards are being shown multiple times and one where the game fails to pick a card in time, but those are just errors i make in fixes
One solution to not allow it to pick the same cards is by putting it inside of a table and checking if v is inside of the array.
idk why i didnt think of that, ill try it
And is the "card picking" inside of the screenshot you sent or is it a different function outside of the screenshot?
the screenshot shows a function thats meant to pick a different card until it finds one that isn't already in the lineup
so if card 1 is A, card 2 will flip through the possible cards until it finds one that isnt A
Ok so basically still the same solution! ^^
Let's say a candidate is picked called "Card A" in the 2nd slot or any slots above one, as Its impossible for the first slot to be a clone.
First:
Once a card has been picked i assume you call the function to check if its a clone
Second:
Check if the card if the card matches with anything in the slots table,
Third:
If it doesnt pass, use a repeat to repeat picking cards until its not the same card as in other slots
Else just put it inside of the card slots table with just its name, and slot number
Although my answer isnt entirely accurate to the actual solution, depending on how you code it in... Butttt.... this is just a good example on how you can fix it 
But i also don't trust myself so oh well!
Just make sure you’re not endlessly re-rolling, it’s usually safer to remove picked cards from the pool so duplicates can’t happen at all.
yeah im trying that one out rn, thanks for the input
No problem! Glad i could help 'v'
update it worked, thank you p() you are the funny chin beard 🙏
Glad you got it working! :D