This is a totally untested theory but I think it should work. If not, I’m sure someone will correct me.
First, create a Global Properties …let’s call it CardCounter …with a numeric value of 0 and a range of 0 to 4.
Create a Region Point (Irregular Grid) or a Zone that the cards will be sent to. In this case, let’s create a RP called CardsDrop
Create a Prototype for the cards. In this prototype, place the following traits. Keep in mind that I’m listing these traits in execution order. On a game piece, traits are executed from the bottom up so they would be listed in reverse on the game piece / card.
Trigger Action
Triggers on CTRL 0
Performs the following keystrokes
CTRL 1
CTRL 2
Set Global Property
GP = CardCounter
is numeric
Range = 0 - 4
Key Command = CTRL 1 - Increment value by 1
Send to Location
Keyboard Command = CTRL 2
Send to Region Point = CardsDrop
Advanced Options
X offset = 20 Times $CardCounter$
Y offset = 20 Times $CardCounter$
(Note on Send to Location quirk - If you use Advanced Options on a STL trait and then save and reopen the trait, the Advanced Options box will no longer be checked and the options won’t be shown. If you check the box, you’ll see the options are still there and they will still function whether you can see them or not.)
Now set up a Global Key Command somewhere. For this example, lets say you have a button that deals cards. This button would contain the following traits.
Action Button
Invokes a CTRL 3
Trigger Action
Triggers on CTRL 3
Performs keystrokes
CTRL 4
CTRL 5
Global Key Command
Triggers on a CTRL 4
Sends a CTRL 0
Matching properties - CurrentMap = (map window that contains the deck) && DeckName = (name of the deck)
Fixed number of pieces = 4
Set Global Property
GP = CardCounter
is numeric
Range = 0 - 4
Key Command = CTRL 5 - Set value directly to 0
With this example, the button would send a CTRL 0 to the number of cards specified. Each card receiving the command would update the CardCounter and then send itself to the Region Point. Since the offset of how the card is placed is dependent on the CardCounter, each card should offset itself by 20 X and 20 Y. After all the cards have been sent, the button will then reset the CardCounter to 0.