Passing location properties between counters

Apologies because I feel like I should be able to figure this out, but I’m just not “getting it” when I look at the reference manual. I want to take the LocationName property of one counter, and pass it to another specific counter on another map. Any hints or guidance appreciated; thanks!


There are several ways to do this, depending on exactly what you mean by ‘passing’ and how that is initiated.

The easiest way is to use the new ‘Set Dynamic Properties in target pieces’ feature of the Global Key Command (VASSAL Reference Manual). This allows one piece to cause a Key Command to be activated in a remote piece AND at the same time, set a value into a Dynamic Property in that piece.

Your Global Key Command would look something like this:

The target piece selected by the expression will need to have a Dynamic Property named LocationFromOtherPiece defined, which will be set with the LocationName of the source piece when it recieves the RecieveValue KeyCommand, which can be used to trigger other actions that depend on the passed location name.

Thank you, Brent, appreciate the response. I will try this and see if I can make it work.