52 Card Deck
jaredjakes
Member Posts: 2
How can I design a 52 card deck that is randomized. I am new to GameSalad and need to be pointed in the right direction.
Comments
One day... One day! :P
Ace
1. make 52 attributes and call them card1, card2... this is your deck.
2. then make a random "machine" to achieve the goal of giving each attribute a single value (there are several ways)
3. when picking up a card, read the first attribute on your deck (card1), store in another attribute (e.g. p1card1) and set card1 to 0.
4. when picking successive cards, you have to make 52 rules that check if first card is = 0 then read second, if second is = 0 then read third... and so on until you get the next unused cards.
**EDIT: you can do easier with an integer attribute "usedcards", but this is to allow to remix the USED cards only if you need to, preserving the ones already assigned**
then there are other tons of things to do to make it work.
After you have done all of this, you can do all the game rules.
It would be feasible if it weren't for the fact that managing 52 nested rules means having to wait tens of seconds to open the actors, and then wait every time you perform the most basic action.
Moreover, you will have to scroll with a lot of patience in expression editor, if you have 52 attributes.
I did a game that's still in half-development. I wonder if I will never end it. Too much to wait for everything.
But yes, you can do it!
Im so confused, I want the cards to be able to be flipped face down and then be flipped up too. This might take awhile.