How to fire a Trigger automatically when a Piece selected


I am new to VASSAL and trying my first module. I am doing a test, I want to fire a Trigger as soon as a piece is Selected on the Map to show me the pieces name in the Chat log . I set the below parameters for the Trigger and add it to the Pieces Trait list above my Report Action(which is listening for the ShipSelected Key command). →

   **Description** - Report when selected

Trigger when properties Match- {(Selected==true)}
Menu Command - Select this Ship
KeyCommand - ShipSelected

My issue is the above ONLY works when I click on the “Select this Ship” from the Pieces context menu . I was hoping it would fire automatically when the “Trigger when Properties” match is evaluated every time I select a piece on the map. Any ideas as to why it doesn’t ?


The trigger will also work when you use a Global Key Command to send the Key Command ShipSelected to the piece, requiring you to (a) select the ship piece and then (b) press the GKC button or other gkc mechanic to send the command to the ship piece, not what you appear to be after.

I think you need to look at Action Button. That is the way to get a piece to do a command by clicking on the piece or some part of the piece. I am not sure that will work on the palette, would be interested to hear if it does.


Yep that works marktb1961! Cheers- thanks for the suggestion. I had to expand the size of the default setting (40X40) to 80 X 80 pixels to cover the whole piece but all good :slight_smile:

1 Like