Removing all of a certain marker from the map

Hi all,

Still relatively new to Vassal design, though I have a few modules here and can handle the basics of counters,cards, etc. However, for some reason, the entire procedure for global traits and having actions occur due to key commands is eluding my poor, befuddled mind :frowning:.

I have a new development project where all counters are marked with DONE markers after being used in a turn. It would be totally awesome to be able to have a global key stroke to delete these DONE markers, but I am completely baffled on how/what needs to be done. #sigh#

What I have is the following:

  1. pieces that are to be affected are given a prototype of, for example, Ger_vehicle
  2. in Ger_vehicle, I have the Place Marker command to place a DONE marker using Cntl-A
  3. In Ger_vehicle, I have the delete trait using default of Cntl-D
  4. the DONE marker (and currently all markers) have the prototype of “Marker”

I get that I will need to make sure any trait is not in the ‘Marker’ prototype, or all markers will be delete upon the key press. Lets say I want the key press to be Cntl-R.
I get that the trait that needs to be assigned needs to go in the Done marker piece.
What I don’t get is what syntax and what trait must be used for all Done markers to be deleted when I press Cntl-R.

Any help would be appreciated…thanks!

-Kevin Bernatz
Doc Beernutz Development (currently developing wargame projects for GMT and Compass Games)

In your Marker prototype, include the trait

Marker - PieceType = DONE

Also include a delete command that will activate on Shift-R

On your button, include a Global Key Command with the following:

Menu command = Delete DONE Markers
Keyboard command - Ctrl-R
Global Key command - Shift-R
Mathching Properties - CurrentMap = && PieceType = DONE
Apply to all pieces

Now when you click the button, it will send a Shift-R to all pieces on the map named as CurrentMap and all pieces with the marker PieceType = DONE.

Hi DrN,

So for the traits added to the Marker prototype, it goes as follows

add the trait ‘Marker’
Property Name = PieceType
Property Value = DONE
add the trait ‘Delete’
Keyboard Command = ‘Shift-R’

For the button, I use “Add Global Key Command”
Description being “Delete DONE markers”
key command being ‘Shift-R’
Matching Properties being exactly the text you entered above: “CurrentMap = && PieceType = DONE”
Within a Deck being ‘Apply to all pieces’
Button text = DONE (or anything descriptive); same for Tooltip text
Hotkey = Ctrl-R

So when the button is pressed (or anyone presses Ctrl-R), all of the DONE markers are deleted. This is what happens…so awesome! Thank you VERY much!

-K

Having trouble getting this to work.

Game piece definition
MoveFire
Traits
Delete
Command: Shift R
Clone
Marker
Property Name: PieceType
Property Value: Fire

Global Key Command
Key Comand: Shift R
Match Proerty: CurrentMap = && PieceType = DONE
Check : Apply to counter on this map only
Witin a deck, Apply to : all pieces
Hotkey: Ctrl R

Qusetion is " a fixed variable?

In my module you can choose 1 of 2 maps.

Main map: Main Map

Thanks

Figured it out. Thanks for looking!