I’m using VASSAL 3.2.0-beta4. I found that Global Key Command could not work well in Multiplayer game. The module is attached.
Module design: In this game, one can mark a warrior as a “Target”. If another warrior be marked, the previous mark be automaticly removed and the new be marked as a “Target”. It means, at the same time, just one warrior could be marked as “Target”. If one click “End Turn”, all “Target” mark be removed and console report this player ends his turn.
3 buttons on the toolbar:
Red aim button - mark a warrior as “Target”
Gray aim button - unmark all “Target”
End turn button - unmark all “Target” and report end turn
In a single game:
first drag 4 warrior to position 1-4, now you can mark any warrior as a “Target”. If you mark another, the previous mark will be automaticly removed. If you click “End Turn”, “Target” mark be removed and report end turn.
It works well in a single game!
Now in a multigame:
first drag 4 warrior to position 1-4. Player 1 marks a warrior as “Target”, at this moment, Player 2 uses his skill that could mark another warrior as “Target”. When Player 2 marks another warrior, the previous mark is not be removed as we wish.
let’s test another case: Player 1 marks a warrior as “Target”, now Player 2 ends his turn (I know it’s not reasonable, but let’s focus on the technical problem), console report that Player 2 ends his turn, but the mark is not be removed.
It doesn’t works well in a multigame!
but if you click Target or End Turn twice, it works at the 2nd click. I don’t know why.
What I design in module:
Most property be difined at [Game Piece Prototype Definitions].
I added a Trigger Action to watch Mark Target Hotkey, then perform Unmark Target Global Hotkey first, and then mark.[in “CanTarget” definition]
Another Trigger Action watchs End Turn Hotkey, then perform Unmark Target Global Hotkey first, and then report.
My opinion is, The “Unmark Target” global key command doesn’t work well in a multigame. Is that any solution for this?