v 3.1 - problem with trigger action

I’m completely stumped on this one:

My module has an army morale marker that moves left and right along the spaces in an army morale track. The spaces have a rectangular grid and are numbered from 0 to 15.

When individual units take a hit in combat, they have a trigger action trait that fires a global key command: CTRL SHFT L. That command does two things - it moves the army morale marker one space to the left and it also decreases the dynamic property “Army Morale” by one.

The problem occurs when I try to create the trigger action trait for a unit that takes two step losses. All I’m doing is asking it to fire that global key command twice. But for some reason, the marker only moves once even though the dynamic property is reduced twice.

Furthermore, when it reports this action, the message reads, “Army Morale moves from 14 to 13. Army Morale moves from 13 to 13.” The numbers in that message are grid locations. And yet it reports the dynamic property is at 12, exactly where it should be after a two-step loss from 14. So it seems that CTRL SHFT L has indeed been triggered twice, but somehow it is only moving the marker once.

I should add that CTRL SHFT L is not used by any other piece in the module.

Help!

I suppose it would have helped if I actually posted the module :blush:

Here is a stripped down version of it: vassalengine.org/community/index … page=Files[url]

The file is Saratoga_test.mod. The “New” scenario shows the problem - when the Burgoyne leader counter is captured, the morale marker should move three spaces to the left and report each of those three times. It reports all three, but the marker only moves one space. If anyone can figure out why, I will be eternally greatful!

I believe this is an issue with the way the ‘Move Fixed Distance’ trait handles multiple moves resulting from one keycommand. It has some ‘special code’ that I don’t quite follow to batch up up moves and handles them later in a seperate thread. I think the nett result is that the piece is moved 3 times from it’s initial position, rather than from the resulting position after each seperate Move.

I have opened bug # 2319018 for this problem.

I was not able to find a workaround unfortunately.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I was able to make a work around for this type of sequence in the Successors
III mod with the loyalty and VP tracks but don’t see the particular relay
sequence at the moment, it was pretty involved with lots of duplicate traits
firing different keys dependent on a DP value - still the original problem
is probably a bug

Post generated using Mail2Forum (mail2forum.com)

As I recall, the reason for bundling up the moves was to make sure that the relative positions of the moving pieces was preserved. For example, moving multiple selected pieces from the same stack, or moving a row of pieces all at once. The ‘special code’ fixes problems where pieces move from top to bottom or combine unexpectedly in these cases.

rk

Post generated using Mail2Forum (mail2forum.com)

It is causing multiple ‘Moved Fixed Distances’ to fail. If a piece is told to move 3 times 100 pixels north, then it is moved 3 times from it’s initial position and end’s up 100 pixels north instead of 300 pixels north.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Joel,

Got this one sorted in swampwallaby-work@4530

Bug [2319018] Triggering multiple ‘Move Fixed Distance’ traits doesnt work

Pieces scheduled for multiple moves now use the final calculated position after any existing moves as the starting point.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Merged to trunk@4532.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)