Auto-flip when moved

Is it possible to define a trait (a Trigger, I suppose) which will automatically flip a piece when it is physically moved? I know this is possible (with a Trigger) when a piece is moved via a defined menu (or its keyboard equivalent) command, but I can’t seem to figure out how to trigger a flip when physically moving.

Tie your trigger to the last field in the Map Dialog preference window (should be “key to perform on moving piece” or something like that)

After some head-scratching, I finally understood to what you are referring and where located. Having now tried it, I find that the piece is flipped in ALL instances of moving, including when initially dragged into play from the inventory window to the map. This is not desired. I only wish for the piece to flip when it is moved from one location to another on the board itself, and in no other instances should the piece flip (unless the menu/key command is invoked voluntarily). Having got this far, then, how do I now restrict this behaviour as desired?

Use the property match expression in the Trigger–something along the lines of CurrentBoard = name of your board here && oldBoard = name of your board here

That will at least prevent the flipping when you drag an item from the palette onto the map. If you want to get more specific than that, you can define Zones on your board and use those as restrictions, too.

Be it noted that I have been doing all of the above under version 3.24. Since I have been getting a strange error report (about someting else - supposed bad data) regarding the selfsame piece under discussion, I was curious as to what would happen under an earlier version. Therefore I went back to 3.23 to try it out. I found that under 3.23 the pieces do not auto-flip when dragged INTO play. So something got changed between versions. While by literal definition, dragging a piece into play is moving that piece, this is not a “move” in games-mechanics terms. The default behaviour therefore should be to not flip when dragging from the palette onto the board proper.

Okay, granted there must be instances where a designer wishes a command or commands (if one uses a series of connected Triggers) to be applied as a piece is dragged INTO play. So, annoying as it may seem, I will have to write in the exception conditions to the pieces to prevent the flipped.

Sigh… the (retired) programmer/systems analyst in me says the default should be as it is. The gamer in me sees that it can cut both ways. The me who is designing a module right now and wants it to be finished wishes… LOL – I’ll just shut now :slight_smile:

Thus spake miyazakigrognard:

Be it noted that I have been doing all of the above under version 3.24.
Since I have been getting a strange error report (about someting else -
supposed bad data) regarding the selfsame piece under discussion, I was
curious as to what would happen under an earlier version. Therefore I
went back to 3.23 to try it out. I found that under 3.23 the pieces do
not auto-flip when dragged INTO play. So something got changed between
versions. While by literal definition, dragging a piece into play is
moving that piece, this is not a “move” in games-mechanics terms. The
default behaviour therefore should be to not flip when dragging from the
palette onto the board proper.

You might be affected by bug 9700, which we’re still trying to solve.
3.2.4 contained a change which didn’t solve the problem.


J.

Debugging is the best part of programming, especially at the framework and/or compiler level.

Try the current dev build:

vassalengine.sourceforge.net/builds/

If you’re still having a problem with that, post a minimal test module demonstrating the problem.