In Air and Armor. I have a button the upon the end of a formations activation it removes all it’s markers. I broke it down so that each marker type is removed separately. which is why there are multiple delete commands.
Set Button text, Tooltip text, Button icon, Global Key Command, etc. to what ever you want.
Set the Named command of Hotkey to deleteTemporaryMarker.
Set Additional matching expression to {TemporaryMarker==true} (strictly speaking, this is not needed if the hotkey is unique to your marker type, but it probably doesn’t hurt either).
Alternatively, use the Pre-select (Fast Match), and select by property, Property name: Temporary Marker, Comparison: ==, and Property value: true.
When you press the button, all pieces that have the Marker trait TemporaryMarker set to true (i.e., those that have the Temporary Marker prototype) will receive the command deleteTemporaryMarker.
You can of course add more prototypes - say Battle Marker prototype, Fired Marker prototype, Rest marker prototype, and individual pieces can have multiple prototypes. Each prototype can define its own Marker trait and possibly their own Delete trait, though they could share that.
The main point is to use a Prototype - which is shared amongst specific pieces - to encode the behaviour. In that way, the code is in one place and can easily be updated or upgraded.
Thanks a lot guys for your help.
But I must say that I see my limits here.
I haven’t been able to make it work with both of your methods…
I’msending a pm to Kevin.