Create account / Log in

How to trigger action on a particular map from toolbar

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

How to trigger action on a particular map from toolbar

Postby starfish » March 13th, 2015, 6:05 pm

All:

I am trying to build a button on the Toolbar that will send a command to all pieces on the board of the player pressing the button.

So, when Player 1 presses the button, the "CTRL M" hotkey should be sent ONLY to the Player 1 board, not all boards. The CTRL M is going to trigger all counters on the board and move them a fixed distance forward. Ideally I want to move them one ZONE forward. This board is called "Player 1 Board" and has 4 zones defined on it. So, units in zone 3 should end up in zone 2, all zone 2 go to zone 1, and all zone 1 go to zone 0. NOTHING SHOULD CHANGE ON PLAYER 2's HAND (BOARD).

When Player 2 does this, same CTRL M goes to his board.

Thanks!

I am thinking that the ACTION BUTTON should call HOTKEY CTRL SHIFT M, which activates ...
Global Key Command that will send the CTRL M, but how do I set the Matching Properties to match my Player 1 Hand and Board Name?
starfish
 
Posts: 26
Joined: April 13th, 2013, 6:25 pm

Re: How to trigger action on a particular map from toolbar

Postby Tim M » March 13th, 2015, 7:10 pm

Name your Map (Player Hand) the same as the defined player's side then you can use the property match expression CurrentMap = $playerSide$

This insures it only affects the map of the player who is pressing the button
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1812
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: How to trigger action on a particular map from toolbar

Postby starfish » March 15th, 2015, 11:49 pm

Thanks! I was not sure of the expression, but was thinking that was how to do it. I'll give it a try and let you know how it works out.
starfish
 
Posts: 26
Joined: April 13th, 2013, 6:25 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 1 guest