I have a text label on the main map that counts the cards of a deck. The deck itself, however, resides in its own map (window). The problem I was experiencing was that, while the counter worked, it had to be refreshed/painted by clicking on the main map to properly reflect the correct card count.
So, this was my solution. I’m posting here as a reference for myself in the future, but also to see from y’all if there was a better way. For reference, the main map is unsurprisingly called “Main Map”, which includes a zone called “Events Deck”, which is where the counter label sits. In the picture above the “28 Cards” is actually sitting on a map graphic, not a vassal piece of any sort, i.e. that’s not where the actual deck sits.
For starters, I added a “Move Fixed Distance” on the label with all values set to zero. The idea here isn’t to actually move anything, but to use that trait as a way of forcing a repaint.
From there I wasn’t totally sure how to trigger this from a piece on a separate map, so I opted to modify the card prototype to include a trigger that in turn would call a Global Key Command:
The trigger looks like this:
And the GKC looks like this:
Then, on the Event Cards map window, call the trigger on all units (cards) that move on that map:
This seemed to work! When I move an event card in its own window it refreshes the counter on the main map.
The only thing that confused me is that it seems like I had to specify both the Key Command and a Global Key Command name, not sure I get it, but I’m just going with it for now. Perhaps one of you can explain.
In any case, I thought I’d present this here to see what people thought, and to see if there was perhaps a better way.