VASSAL Reference Manual


Place Marker

A Game Piece with this trait will have a menu command that places a different piece (the "marker") on at the same location as this one. You can select any existing piece for the marker or define a new one from scratch. A new piece will be placed each time this trait is activated.

It is also possible to set values into existing Dynamic Properties that exist in the placed Marker.

The new piece placed by this trait will have the ParentID property set to the value of the UniqueID property from the piece that placed it. This allows the placed marker to use the Global Key Command trait or the Set Piece Property trait to communicate with the parent piece by including the following in the Additional matching expression:

{UniqueID=="$ParentID$"}

Note
This trait should not be confused with the Marker trait which allows a piece to be assigned a Property with a static constant value.

EXAMPLE: If a game uses a fortification counter to indicate fortified status of an army counter, this trait could be given to the army counter to place a fortification marker on the army with the right-click context menu or a keyboard shortcut, as an alternative to dragging the fortification counter from the Game Piece Palette.

SEE ALSO: Replace with Other trait.

Description:

A short description of this trait for your own reference.

Menu command:

The right-click context menu entry for this trait, if desired. If left blank, this trait will not produce a context menu item but may still be activated by the Key Command, below.

Key Command:

A Keystroke or Named Command to initiate placing the new piece.

Define Marker:

Use the Define Marker button to open a Piece Definer to create a new definition of the marker from scratch.

Select:

Use the Select button to use the definition from an existing piece in the module. This acts as a pointer to an existing definition: if the original piece is changed, the piece created by the Place Marker trait will also change.

Horizontal offset:

The new piece will be placed this many pixels to the right of the original piece. Any value other than zero will prevent the new piece from stacking with the original piece.

Vertical offset:

The new piece will be placed this many pixels above the original piece. Any value other than zero will prevent the new piece from stacking with the original piece.

Match Rotation:

If selected, and both the original piece and the new piece have the Can Rotate trait, then the rotation angle of the new piece will be adjusted to match that of the original piece.

Place marker:

Choose whether the new piece should be placed on the top of this piece’s stack, on the bottom, or directly above/below the triggering piece.

Set Dynamic Properties in marker:

Allows you to set the values of the named Dynamic Properties in the created marker.

The expression used to set the value can reference existing property values in both the piece creating the marker (Using $$ variables) and in the newly created marker.

The values are set into the new marker before the Keystroke after placement is applied.

See Passing values to pieces for more detailed information on using this feature.

Note
The named Dynamic Properties must exist in the Piece Definition of the Marker to be created. This option does not create new Dynamic Properties
Keystroke to apply after placement:

Optional Keystroke or Named Command to be applied automatically to the new piece immediately after being placed. This Key Command can be used to activate a trait in the new piece, for example to move it to a different location.

Marker