Q re: dealing random cards to a board

Hi, Im following ‘Dealing Random Cards to a Board’ on p78 of designer guide

In steps 6 & 7 I add traits directly to the cards (Send To Location, Set Global Property) and the process works.
But when I try adding these traits via a prototype added to the cards, it doesn’t work.
Is this true, or am I simply doing something wrong in my prototype instructions?

In step 8 I create a GKC to send a “fixed number of pieces” from the deck. Is there any way to send a variable number of pieces (for example at start of game 7 cards, later on 6 cards). I tried substituting in a global variable name $DealNum$ but the input box seems to reject it.


Ok, the answer to (1) is yes prototype traits should work fine.

That field won’t accept a variable value, so your two main choices are:
(1) Make two different GKC’s, e.g. one to send 7 and one to send 6, and issue one or the other depending on which time in the game it is (You could hid this from the player by having a “Deal Cards” trait then issue a hidden key command “DoDealCards”, and have two different Trigger traits that each watch for “DoDealCards”, with a matching expression condition in one of them for e.g. “Turn <= 3” to then issue the 7 card deal and one matching “Turn > 3” to issue the 6 card deal on.
(2) Make a single GKC that does 1 card, and then have a Trigger that uses the “Repeat this set of keystrokes” trait, and issues it the right number of times, since this functionality will except a variable value. I don’t really recommend this way, because multiple firings of GKC’s is slower performance-wise.