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.

I have a similar question: if I drag a counter from a cup to the map, it is marked as moved. How do I set up a trigger to not have it show as moved when I do that? After it’s on the map, I want to show it as moved.

Follow the previous instructions in this thread, and set the “Key command to apply when pieces end movement on this map” to whatever the Key Command to reset the Mark when Moved trait is.

1 Like

I thought I could do this (see screenshot), but it doesn’t fire. If I drag a piece from the cup to the map and have a menu command, it is available until I move the unit on the map and then it is grayed out. This makes me think it’s evaluating correctly, but it never sends the CTRL+M to turn off the has moved.

You need to specify either a Key Command or at least one ‘Watch’ Key commands or a Trigger will never fire.

In general. all traits need a Key Command specified to work.

1 Like

Trigger Actions (and pretty much any trait with associated Menu & Key commands) will not function if they don’t have a Key Command associated with them–you need to put something in either the Key command or the Also watch for these Key Commands fields (ideally, the Key Command the map is sending “When a piece ends movement on this map”).

Edit: Brent beat me to it, but my post is a bit more detailed, so I’ll leave it here. :wink:

Thank you both for your response. I got it to work. I simply added a key command to the map (“when a piece ends movement on this map”) called “MovementEnd” and used the same Key Command on the trigger.

1 Like