Triggering Multiple Traits?

I have units that I pull from a cup and place on the map. As they move, the Mark When Moved displays the icon next to the unit that says “Moved”. This is standard behavior and can be toggled using CTRL+M. If I return the counter to the cup (CTRL+R), the unit will still display the moved icon assuming that is still true. Is there a way to say “if returned to cup, set mark when moved to false”? TIA.

I believe it is possible and not too difficult.

If the cup is on a specific map, I believe the moved mark can be set to false upon the piece ending its move in the cup. This is how I would try: For the map with the cup, set a Named Command in Key Command to apply to all units ending movement on this map: Be sure the cup has a unique location like a zone or deck (if you define the cup as a deck). Give the pieces drawn from the cup a Trigger Action action that has a Trigger when properties match: expression for the piece being in the cup that then issues the Key Command CTRL+M or a Named Command in the Mark When Moved trait.

I do the same as pawnpusher, except I use “Moved==true” in the Trigger when properties match expression in the unit’s trigger, so it doesn’t try to mark units that aren’t already marked. Works perfectly. I’ll use this to reset units sent to the Dead Pile, e.g. removing step loss markers, flipping to full-strength side, resetting rotation, etc.

1 Like

I’m not quite understanding. From the Map Window (which is the cup with the pieces) I need to choose “Add Global Key Command”? And what settings do I put there?

All map windows have a blank where you can insert a Key Command or Named Command which the map applies to all units that end their movement on the map. See: VASSAL Reference Manual
The link is to the map window page and the Key Command to apply to all units ending movement on this map: is the last blank to fill in for the map in the editor. The explanation for this blank is a little ways down on the page just before the list of map sub-components.

Thanks, somehow I missed that! I’m getting closer - if the piece is marked as moved and I return it to the cup, it is unmoved. However, if the piece is marked as unmoved and I return to cup, it is marked as moved.

[quote=“Rodzilla68, post:6, topic:75557, full:true”]However, if the piece is marked as unmoved and I return to cup, it is marked as moved.
[/quote]
This is why I use ‘Moved == true’ in the expression for the Trigger, so if the unit is not marked as moved it does nothing.

I used Moved==True. See screenshot:

It needs to be either Moved=true or {Moved==true}.

1 Like

Thank you! The piece I was missing was I had to set “Perform these key commands” = CTRL-M. The trigger was evaluating, but I didn’t have it do anything! Thanks everyone for the help.

Thx for correction. I extracted the segment from my expression then forgot to add back the braces.