Create account / Log in

Weird behaviour from Trigger Actions that move pieces around

Issues with the Vassal engine.

Moderators: Tim M, uckelman

Weird behaviour from Trigger Actions that move pieces around

Postby ianclarence » January 18th, 2018, 6:01 pm

Hi,

My latest module relies heavily on Trigger Actions to move pieces around and I'm seeing some very weird behaviour. If I can't find a solution I may have to abandon it completely.

I'm building a module for an air game. Counters represent individual aircraft and it uses a hex grid. Players secretly choose one of the predefined maneuvers for each of their planes and when everyone is ready a module-level button sends Ctrl-X to each one of the planes which kicks-off the appropriate maneuver for that plane.

The maneuvers are implemented by Trigger Actions. Each TA will move the piece to its new hex and may also rotate it if a change of heading is required.

Everything looked good when I tested with a single aircraft but with 2 or more some of the planes are executing some of their maneuvers incorrectly.

I have a cut-down version of the module which demonstrates the problem. It implements just 4 maneuvers:-

S1 = straight ahead 1 hex
S2 = straight ahead 2 hexes
R1 = 1 hex forward then rotate right 60 degrees
R2 = 2 hexes forward then rotate right 60 degrees

The bug is 100% reproducable using the following steps:-

1. Open the module on the Allies side.
2. Right-click on aircraft #1 & set maneuver S1.
3. Right-click on aircraft #2 & set maneuver S2.
4. Press the "Execute All Moves" toolbar button.

What should happen:-
- aircraft #1 moves forward 1 hex.
- aircraft #2 moves forward 2 hexes.

What actually happens:-
- aircraft #1 moves forward 1 hex.
- aircraft #2 moves forward 2 hexes then moves AGAIN, another hex forward. This extra move is clearly documented in the chat messages and is not part of the S2 move.

The bug is also seen if aircraft #2 is set to perform the R2 maneuver:-

1. Open the module on the Allies side.
2. Right-click on aircraft #1 & set maneuver S1.
3. Right-click on aircraft #2 & set maneuver R2.
4. Press the "Execute All Moves" toolbar button.

What should happen:-
- aircraft #1 moves forward 1 hex
- aircraft #2 moves forward 2 hexes then rotates 60 degrees right.

What actually happens:-
- aircraft #1 moves forward 1 hex.
- aircraft #2 moves forward 2 hexes, rotates right then moves AGAIN, another hex forward.

The bug is NOT seen in any of these situations:-
- for any of the maneuvers if there is only 1 aircraft on map.
- for maneuvers S1 or R1 regardless of the number of aircraft on map.

This is a Dropbox link to the test module:-
https://www.dropbox.com/s/yvr5wqhe6zw6x ... .vmod?dl=0

And this is the log file from the S1+S2 test above:-
https://www.dropbox.com/s/7eh7d8sy7jld35a/log.vlog?dl=0

I would really appreciate it if someone could look at this. These TAs are essential to what I'm doing - without them players would need to move all their planes manually and the whole point of the module is lost.

Thanks.

Ian.

My system:
AMD Athlon II 630 (4 cores), 4 GB RAM, Linux Mint 17.3, Java - 1.7.0_151, OpenJDK Runtime - IcedTea 2.6.11, VASSAL 3.2.17.
ianclarence
 
Posts: 11
Joined: April 28th, 2015, 10:12 pm

Return to Technical Support & Bugs

Who is online

Users browsing this forum: stew-rt and 5 guests