Automatically counting a piece movement points

Hello in the Knights of the Air module 3.5 the designers used an optional Movement Point counter. I like this as it keeps track of MP expended. The problem is that one HAS to manually increase the counter. There also was no way to zero out the counter once the turn was over other than roll it back one by one. I fixed both the zeroing out and I’ve added a feature that allows it to automatically count. This is triggered by the arrow up key stroke. This works great for straight move but it introduces new problems. First how do you count sideways movement? i.e a side slip for instance, the key stroke is different. Second, when performing maneuvers, sometimes it costs two or three MP per hex, how do you add this if the keystroke is not the forward arrow and I don’t want to move the physical counter?
SO basically what I would like is the ability of the system to count this MP every hex it moves weather its forward to a new hex or sideways to a new hex. Turning in place costs nothing. Then I would also like to manually add MP to the counter in case it costs more than 1 MP per hex while maneuvering.
How would you do this and can it even be done?

One way to do it would be a map trigger that looks at whether OldZone equals CurrentZone, or whatever works for your hexes, and if not, increment the counter. Decoupled from the movement keys, you can then allow manual adjustment for corrections.

That would allow for the counter moving either forward or to the side and up number the counter. And as you said you can also manually increase it to compensate for additional MP in an hex if there is a maneuver. Now comes the hard part, how do I write that map trigger function and what tooltip do I use to put it in? If I use the same Layer that was used and then add the expression how do I then allow for manual inputs? Do you have an idea on how I could do this?

You are going to probably have to do some reading on this.

I can point you to a few things:

Edit the map, you’ll see you can add a key command to any piece ending movement on the map.

Edit the piece, add a Trigger activated by the key command with a condition OldZone!=CurrentZone (or OldLocationName!=LocationName if you have a Grid instead of Zones). This trigger will now activate whenever the piece is moved to a new location. Set it to give another key command. Add other conditions for the trigger as required.

The trigger key command increments the counter.

All these key commands should be strings, like “Increment1” and not single keys.

Different key commands (presumably single or combination key presses) can increment or decrement the count manually.

As what Benkyo wrote…

I have marker that counts “ranges”, movement on a map.

Trigger Action
Trigger when properties: {CurrentMap==“GameMap” && OldMap==“GameMap”}
Perform these Key Commands: IncreaseCount

The module has several maps. Also, pieces may be moved to a map in another window. The counter is specific to the gameamp. The game map has both a grid (for the catographic map area) and zones for the off-map areas.

Dynamic Property
Property name: RangeCount
is numeric: checked
Minimum: -100
Maximum: 100
Key Commands
Menu KeyCommand Type Prompt
+1 IncreaseCount Increment numeric value 1
-1 DecreaseCount Increment numeric value {-1}
Reset to zero Ctrl+R Set value directly 0
Set Value Ctrl+S Prompt user Numeric Value

This creates a property “RangeCount” that may then be written on the piece using the Text Label action.

The other menu commands, allow for direct specificaiton or minor adjustmetns, the reset to zero also allows for a Global Key Command to reset the value to 0 for multiple pieces.