How to prevent generating Movement Trail on some maps?

I want to have Movement Trail on the main map, but not on a number of secondary maps where they clutter and have no function. It seems that Movement Trails are “global” in the sense that they apply everywhere, and I can only find a command that toggles the Movement Trail, but not one that turns them on or off,
If I let the secondary map issue a key command for all movement that ends on that map, the Movement Trails are toggled off, but on the next move they are toggled on again, and so on.
Is there a way to see if there is an active Movement Trail? In that case, I could issue a command that toggles it back off, if it is on.
I also need a command that ensures that the Movement Trail is back on when the unit is moved to the main map …

You’re on the right track, but must be using an old version of Vassal. More recent versions of Vassal have enhanced the Movement Trail trait to define additional commands that can explicitly turn trails On (show), Off (hide) or Clear in addition to the (now obsolete) Toggle command.

I suggest that you define a Trigger Action which listens for the command which gets sent when a piece is moved on the secondary map. That trigger would use its Property Match Expression to detect when the piece moved from a different map (to prevent redundant processing if the piece moved around on the secondary map) and send a command to the Movement Trail trait which both turns trails Off and also clears them.

If you need to support the case where the piece is later returned to the Main Map and needs to have trails functioning again, you would use that map’s “ends move on map” command to both clear trails again and turn trails back on.

The above assumes that trails are always enabled on the Main Map. In the case where trails can be turned on and off globally by the user, you should define a Global Variable to remember that current trails setting, and use that property in a Trigger’s property match expression to conditionally per the current global setting.

I hope that makes sense.

Cheers,
Jim Hunter.

1 Like

Silly me! You are absolutely right!

I do use the latest version 3.6.19. I can’t understand how I missed those On and Off commands! Everything you wrote made sense, and I am going to implement it ASAP.

Thanks. :blush:

Hi, I’m trying to implement this, but it’s not working. Is this a valid expression:
{CurrentMap != “Main Map”}

The goal is to show movement trails on the main map (“Main Map”) and not on any other maps. I was hoping to use something like this:

Your Trigger as shown will never activate, as it has no Key command set nor anything listed in “watch for these Key Commands”.

The expression match being fulfilled is not sufficient–you must have a key command set for a Trigger to function.

What is it I’m watching for? That’s the part that’s confusing me.
“If you move a piece and it’s not on the main map, turn off the movement trail stuff.”
How does “If I move a piece” get mapped to a Key Command?

The very bottom config option for a Map Window:

You can set a Named Command (lefthand box) or a Keystroke Command of your choice (obviously it need not mimic what I have here). This is how you detect piece movement and act upon it.

@JoelCFC25 Thank you. That did the trick. I set that key command for all of the player maps to be “playmat” and that was the command I was looking for in the trigger.