How to automatic mask a piece when it is moved back to its original position on a Private window

Ok, the thing is:

I have the a piece on a private map window in a “at start stack” that is masked. That piece has a “sent to location trait” that sends it to a specific zone on the main map board. After being moved to that main map zone and the the player unmask it (only his side can unmask the piece) it can order other pieces to do actions.

At the end of the turn that piece is returned to the private window to its original local (a specified region).

I would like that that piece, when it returns home (to the private map window), would automatically be masked.

Is it feasible?

Thank you very much for help.

José Miguel

There are 2 ways to deal with this. The first option only works if a command is used to return the piece to the private window (i.e., the player doesn’t just drag-and-drop it back on the private window). For this method, instead of directly triggering the Send to Location (or whatever trait you’re using to return the piece), you want to use a Trigger Action, and have it trigger the Send to Location, followed by triggering the Key Command for your Mask trait.

The 2nd option will work even if the player drag-and-drops the piece. This requires you to edit the properties of the Private Window instead. You can access the Properties window by double-clicking on the main entry for the map in the editor. You will need to change the last entry, Key Command to apply to all units ending movement on this map, to send the Key Command that triggers the Mask trait. The problem with this method is it will trigger when any piece is moved onto (or within) the map, so it could cause unintentional flips (of this piece or other pieces that use the same Mask trigger). You would probably need a Restrict Commands trait to prevent this trigger when you don’t want it (which could be complicated).

1 Like

Thank you for the fast answer and the solutions Jonathan. I am out this weekend but I will try it next week and I will let you know. I think I will try the 2nd option as there are no other pieces at the private window with masks.

Yours,

José Miguel

@jmc3 this technique is indeed powerful and extremely useful as noted above. A way to get around the downside of unintended effects is to have the key command applied to all units ending movement on a map is to make it more general in nature. Then control how pieces respond by a Trigger Action that has logic in its property match expression to regulate if and when they respond.

Examples:

Apply named command MovedToMap to pieces ending movement on a map. You have two types of pieces that will be moving to this map, but you want them doing different things when they land there. Piece type A is supposed to rotate. Piece type B is supposed to unmask itself–but not mask if already unmasked.

Piece type A gets a Trigger that handles the received MovedToMap command and fires the Can Rotate keystroke in response.

Piece type B gets a Trigger with a property match of {ObscuredToOthers} and fires the Mask keystroke in response. This way unmasked pieces of type B will fail the property match when moved onto the map and not fire the Mask key command in response.

There’s only a single key command you can set for this map feature, but by passing it through Triggers on all the types of pieces that might need to do things, you can handle it on anything and everything you want, and in many different ways.

2 Likes

I have made it.

Thank for your solutions; they worked perfecty.

The game is almost ready to publish but I need to test it first. This is not only to turn a board game into a vassal module, but a new variant module for Origins of Word War One by JamesDunigan I will inform when it is finished.

Yours indebted,

José Miguel

1 Like