So how would I go about creating a counter, counting the number of cards in a stack and displaying it next to the stack. I do not want to use a deck to do this. I know I can stack cards and send them to a specific location on a map, but how would I count them, and increase that count when a new card is added? Do I have to use zones or is there another way? If I do have to use zones, how would I go about it?
The easiest way of doing this is to use a Count() function in a Text Label trait on the counter piece.
For example, suppose your stack of cards is at a Location named “MyStack”, this text label will work:-
This technique comes with a performance warning because every time your map refreshes on screen, the pieces on the map are searched to redo the text label calculation but I suggest you see how you get on with it.
If you want to put the extra effort in, then you will need to track the movement of cards to and from the stack (e.g. Map movement triggers; updating a Global Property - then display that GP in your Text Label on the counter piece). The following steps assume a GP called “cardsInStack” that is defined in your module Global Properties list and displayed in a Text Label on the counter piece. Another assumption is that the stack of cards starts empty or else is initialised correctly.
Map Movement triggers - one per map on which the cards may be placed. e.g here it is called “mapMove”:
On each Card - key command must reflect each key command from step 1. Example traits:
Hope this helps.