Send Key Command to cards in a Deck

Is it possible to send a Key Command to cards in a Deck?
And if yes, how to do it?

Many thanks for your help

You have to have something to send the command …button, another game piece, menu options, etc.

On the triggering piece, you would use the Global Key Command trait. In this trait, you would enter the GCK that you wish to send to the deck. You would then use the Matching Properties entry to direct where you want the command to go.

You have a card deck called DrawPile.
It resides on a map window called CardTable.

You would send the command to

CurrentMap = CardTable && DeckName = DrawPile

If you want to affect a specific card, you can add the card’s name as BasicName…

CurrentMap = CardTable && DeckName = DrawPile && BasicName = Joker

You can select multiples of a certain type of card by using markers. Let’s say we’re talking about a standard deck of cards. Each of these cards have the marker trait - Suit = Hearts, Clubs, etc. If you want your command to affect only the Clubs, you property filter would be

CurrentMap = CardTable && DeckName = DrawPile && Suit = Clubs

You can also use variables. Let’s say you want a command to affect all of a random suit. Let’s say you have a Random Text Button that’s used to determine the Random Suit and you named this button RandomSuit. You can then use the following to send a command to the deck affecting the roll result:

CurrentMap = CardTable && DeckName = DrawPile && Suit = $RandomSuit_results$

Does that help?

In addition, global key commands have a field that affects decks. By default
it’s set to none, but has the option to affect all pieces or a designated
number of pieces. Depending on how you want to affect the deck, you’ll need
to set this. For example, if you wanted to draw a specific card in a
shuffled deck you would set it to all pieces since you don’t know where the
card is in the deck. You would then use a filter to select the card by name
or property as Dr Nostromo described.

Post generated using Mail2Forum (

Yeah, thanx for pointing that out. It crossed my mind when I was posting my original message but apparently is slipped out the other ear before I had a chance to include it.

Many thanks for the help.

In following your instructions, I have always the problem but I think now know why.

In fact I use a lot of prototype definitions in the module. It seems that the Key Command defined in the prototype does’nt work when I use the Global Key Command or Deck Global Key Command to send the action to execute to a subset of the cards in the deck.

I don’t understand why because the key command work correctly when I use it in selecting the pieces.

To solve the problem, I have copied the definition of the “Send Location” trait in the cards to affect with the Global Key Command.

Best Regards

GKC’s should work in a prototype without a problem.

If it’s not working in a prototype, it may be some other factor or the trait order or something that isn’t apparent that’s causing the problem.