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 .
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:
pieces that are to be affected are given a prototype of, for example, Ger_vehicle
in Ger_vehicle, I have the Place Marker command to place a DONE marker using Cntl-A
In Ger_vehicle, I have the delete trait using default of Cntl-D
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)
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!
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