I am making a module with artillery units. They may combine into fire groups. In order to keep track of which artillery unit is in which fire group I have made an Artillery Group Table (a Map Window).
An artillery unit has two representations, one on the Main Map, one in the Artillery Group Table.
Is it possible to click on a group (a stack of artillery units) in the Artillery Group Table and at the same time highlight the corresponding artillery units on the Main Map?
In other words: is there a Key Command applied to all pieces after a focus (a selection) just like there is a Key Command applied to all pieces ending movement?
I think you could use the selected property and a piece layer to do what you want.
From the user guide: Selected returns true when the piece has been selected with the mouse
Since A GKC can affect pieces on all maps, restrict the GKC to units where selected = true. The GKC then activates a piece layer with an outline image of some sort.
… and I guess I have to make a button in Artillery Group Table window, that when clicked by the user selects the artillery units in the Main Map that are selcted in the Artillery Group Table map window … if you follow me … because the change of value from false to true in the Select property will not by itself generate a GKC.
Is there a way to avoid this? To update the Main Map map directly without the user having to click a button?
Global Key Command button in Artillery Group Table → Trigger Action with {Selected} → Set Highlight with {ID==$ID$} ->Trigger Action Highlight → Layer with Highlight toggled
The nice thing now is that I can clear the selection on Main Map by simply pushing the Global Key Command button in the Artillery Group Table again.