I’m making a “card game” and the player needs to draw a card every turn. However, I don’t want them to draw any random cards, I want them to draw from a deck of cards. So if they’ve already drawn a card twice, they can’t draw it again.
The only thing I can think of is to create a variable for every card. To save memory, don’t use blocks, use counters to change the properties to 0 or 1. 0 is you haven’t drew it, and 1 is you have. when you draw a card, set the counter to 1 using a channel. When the game has reset, use the reset setting and insert a channel there.
On top of that, use this guide.
In other words, there are 2 decks of 30 cards (one for each player). There are 2 of each card. Once you draw 2 of a type of card, you can no longer draw that type of card.
There are two players, each with 30 cards. If I used a counter for each card, I would have 60, way too many.
Would you like to use code blocks that are 500 memory each?
Well… How much memory would 60 counters be?
1500
It would be equal to 3 blocks!
If I could do it in 1 or 2 blocks, I could save space, but I’m not sure if I could do that. I was wondering if there was a somewhat memory efficient way to do this. Also, I’m pretty sure there is a limit to the amount of counters you can have. Does anybody have a (somewhat) memory efficient way of doing this?
Nope!
Ok then, I’ve just had something (I forget if it was terrain of a gadget) that said
You have reached the limit of (I forgot number) for this item.
And it’s still inefficient.
If there is a limit it is well over 100
I’ll try to figure something else out, thanks for your help though!
You have 100 000 memory to work with lol
No problem
@FatKat [1] Remember to mark a solution!
Your background in your profile is Portal?! I love that game!
Love the username lol ↩︎
This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.