# Deleting certain markers on a new Turn

**URL:** <https://forum.vassalengine.org/t/deleting-certain-markers-on-a-new-turn/89430>\
**Category:** Module Design\
**Created:** [October 6, 2025, 7:13am UTC](https://forum.vassalengine.org/t/deleting-certain-markers-on-a-new-turn/89430 "2025-10-06T07:13:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joe/32/165_2.png) [@Joe](https://forum.vassalengine.org/u/Joe)\
**Post date:** [October 6, 2025, 7:13am UTC](https://forum.vassalengine.org/t/deleting-certain-markers-on-a-new-turn/89430/1 "2025-10-06T07:13:14Z")

</div>

HI all,

trying to delete certain markers from the map when going to a new Turn. I have a Turn Marker set up with a GKC to trigger:

 ![2025-10-06 - Window Capture - c](https://forum.vassalengine.org/uploads/default/original/2X/0/085a25219ed2cfd83da1abbf1d2fda29e0189fe8.png)

Then I have a marker with a layer that gets flipped to when placed on the map (the marker is “inactive” in-game, so Layer 2). Later the marker gets flipped to the “active” side (which is Layer 1). Below Layer 2 is shown, Layer 1 is the original marker’s image.

 ![2025-10-06 - Window Capture - d](https://forum.vassalengine.org/uploads/default/original/2X/2/2e7b0ddccbe321eb22517355767eb3dffb35e680.png)

And I am trying to define the Trigger Action for the marker to be deleted if Alt+Ctrl+Shift+End gets triggered at end of Turn, however ONLY for the markers that have Layer 1 visible. Ctrl+D is the keystroke to delete the marker in-game. I am probably doing some syntax wrong or something…

 ![2025-10-06 - Window Capture - b](https://forum.vassalengine.org/uploads/default/original/2X/8/8720db6ffdef70f0e3d7f4a83b07864974c3ad8c.png)

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 6, 2025, 8:11am UTC](https://forum.vassalengine.org/t/deleting-certain-markers-on-a-new-turn/89430/2 "2025-10-06T08:11:21Z")

</div>

A [Turn counter hotkey](https://vassalengine.org/doc/latest/ReferenceManual/TurnTracker.html#Hotkey) is _not_ sent to [Game Piece](https://vassalengine.org/doc/latest/ReferenceManual/GamePiece.html#top)s - only to the [Game Module](https://vassalengine.org/doc/latest/ReferenceManual/GameModule.html#top) or [Map Window](https://vassalengine.org/doc/latest/ReferenceManual/Map.html#top). To propagate the command to [Game Piece](https://vassalengine.org/doc/latest/ReferenceManual/GamePiece.html#top)s you need a trampoline [Global Key Command](https://vassalengine.org/doc/latest/ReferenceManual/Map.html#GlobalKeyCommand). For example

- Module
  - Turn Counter
    - Hotkey
      - Global hotkey: `clearOrders`
      - Match properties: `{Phase == "Orders Phase"}`

  - Global Key Command
    - Global Key: `clearOrders` # Same as in turn counter hotkey
    - Key: `Ctrl+D`
    - Additional matching expression: `{Order==true && Order_Active==true && Order_Level == 1}`

  - Game Piece
    - Mark trait  
Name: `Order`  
Value: `true`
    - Layer Trait  
Name: `Order`  
…
    - Delete Trait
      - Key: `Ctrl+D`

Note that I encoded the condition in the Global Hotkey Command rather than as a Trigger trait in the piece.

> [@Joe](#):
>
> I am probably doing some syntax wrong or something…

No, I don’t think you are, but you’re not using the turn counter element correctly. It is not surprising - that the turn counter hotkey only sends to the module or maps is rather poorly documented ([see also this thread](https://forum.vassalengine.org/t/best-way-to-translate-a-phisical-game-gesture-in-a-module/86617/5)).

> The [Keystroke or Named Command](https://vassalengine.org/doc/latest/ReferenceManual/NamedKeyCommand.html#top) to fire. The module will respond exactly as if one of the players had pressed this key or selected a menu item corresponding to a Named Command.

Note that it says “… selected a menu item corresponding to a Named Command.” That’s the clue - albeit rather obscure.

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![Joe](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joe/32/165_2.png) [@Joe](https://forum.vassalengine.org/u/Joe)\
**Post date:** [October 6, 2025, 8:54am UTC](https://forum.vassalengine.org/t/deleting-certain-markers-on-a-new-turn/89430/3 "2025-10-06T08:54:51Z")

</div>

Thx, but I still seem to be missing something here…

 ![2025-10-06 - Window Capture - e](https://forum.vassalengine.org/uploads/default/original/2X/d/deeadcd35f694ed261932533af86a67d955ae73a.png)

 ![2025-10-06 - Window Capture - f](https://forum.vassalengine.org/uploads/default/original/2X/b/b72420538db255c4f1993154348b5754dd3554b5.png)

 ![2025-10-06 - Window Capture - 10](https://forum.vassalengine.org/uploads/default/original/2X/5/5dc2494dc7277e8691caef336ec6f5a9b60985ab.png)

 ![2025-10-06 - Window Capture - 11](https://forum.vassalengine.org/uploads/default/original/2X/8/8dccb89afa4d0c03f0203ef38c479eb50c1af6c5.png)

---

<div class="post-metadata">

**Author:** ![Joe](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joe/32/165_2.png) [@Joe](https://forum.vassalengine.org/u/Joe)\
**Post date:** [October 6, 2025, 9:09am UTC](https://forum.vassalengine.org/t/deleting-certain-markers-on-a-new-turn/89430/4 "2025-10-06T09:09:23Z")

</div>

BTW I removed the Trigger Action, correct?

---

<div class="post-metadata">

**Author:** ![JoelCFC25](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joelcfc25/32/2687_2.png) [@JoelCFC25](https://forum.vassalengine.org/u/JoelCFC25)\
**Post date:** [October 6, 2025, 2:02pm UTC](https://forum.vassalengine.org/t/deleting-certain-markers-on-a-new-turn/89430/5 "2025-10-06T14:02:50Z")

</div>

Based on what I see and what I understand you to be attempting…

 ![image](https://forum.vassalengine.org/uploads/default/original/2X/4/4e9d2262a0b24fd22b57201bd865b37c2d2ad1be.png)

The portions of the match expression I underlined in burgundy are likely unnecessary–your Layer is set to “Always active”, so `FlipMarker_Active==true` is not helping narrow anything down, it’s going to identify all pieces that have this Layer regardless of which Layer level is showing.

Move `ClearActiveMarkers` to the hotkey portion of your GKC. The Turn global hotkey you showed earlier is broadcasting `ClearActiveMarkers`, so you need the GKC to also act on this. In turn, what you put in the green box–this is the command the GKC is now broadcasting to all matching pieces–will depend on what you want to do. I’m a little confused if you want deletion to happen here (`Ctrl+D`), or the “Set to inactive” (`Ctrl+Shift+Down`).

As an aside, for things like this that are essentially “under the hood” manipulation of pieces, Named Commands are likely going to make your life a whole lot easier in the long term, because you can style the commands as alphanumeric strings that basically clue you in to the function they’re performing. As the number of pieces and commands multiply, it’s easy to get lost in a soup of combinations of letters with Ctrl, Shift, Ctrl+Shift, Ctrl+Alt, etc.

---

<div class="post-metadata">

**Author:** ![Joe](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joe/32/165_2.png) [@Joe](https://forum.vassalengine.org/u/Joe)\
**Post date:** [October 6, 2025, 2:21pm UTC](https://forum.vassalengine.org/t/deleting-certain-markers-on-a-new-turn/89430/6 "2025-10-06T14:21:17Z")

</div>

Thx Joel! Yes, have to shift towards Named Commands as the key shortcuts get confusing fast 🙂 Have to go through the module and replace anything non-essential (in terms of right-click menues and actions for the game pieces, that can also be triggered by keyboard for convenience) to Named Commands.

Will change as above and report back!

---

<div class="post-metadata">

**Author:** ![Joe](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joe/32/165_2.png) [@Joe](https://forum.vassalengine.org/u/Joe)\
**Post date:** [October 6, 2025, 3:20pm UTC](https://forum.vassalengine.org/t/deleting-certain-markers-on-a-new-turn/89430/7 "2025-10-06T15:20:31Z")

</div>

Works as expected, thx very much Joel!
