# Placing "Spotted" marker when enemy pieces are in the same hex

**URL:** <https://forum.vassalengine.org/t/placing-spotted-marker-when-enemy-pieces-are-in-the-same-hex/90635>\
**Category:** Module Design\
**Created:** [October 29, 2026, 6:30pm UTC](https://forum.vassalengine.org/t/placing-spotted-marker-when-enemy-pieces-are-in-the-same-hex/90635 "2026-10-29T18:30:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kend626](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/k/eada6e/32.png) [@kend626](https://forum.vassalengine.org/u/kend626)\
**Post date:** [October 29, 2026, 6:30pm UTC](https://forum.vassalengine.org/t/placing-spotted-marker-when-enemy-pieces-are-in-the-same-hex/90635/1 "2026-10-29T18:30:38Z")

</div>

I am trying to have the automatic placement of a “Spotted” marker when a piece moves into the same hex as an enemy piece. The enemy piece is hidden. I have tried multiple suggestions online but nothing seems to work.

Here are the triggers and GDC I have now

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

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

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

Any help would be appreciated.

---

<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 29, 2026, 10:00pm UTC](https://forum.vassalengine.org/t/placing-spotted-marker-when-enemy-pieces-are-in-the-same-hex/90635/2 "2026-10-29T22:00:13Z")

</div>

> [@kend626](#):
>
> The enemy piece is hidden.

Unless you’ve configured your [Mask](https://vassalengine.org/doc/latest/ReferenceManual/Mask.html#top) trait of the enemy unit, so that _Can be masked by_ is _Any Player_ or _Any Side_, then only the _owning_ side - the side that hid the unit initially - may reveal the piece.

As you piece is moving into the location of the enemy unit, and the [Map Window]([https://vassalengine.org/doc/latest/ReferenceManual/MKey](https://vassalengine.org/doc/latest/ReferenceManual/MKey) Command to apply to all units ending movement on this mapap.html#top) \_ configured _Key Command to apply to all units ending movement on this map_ is executed by your piece, then it is executed in the context of _your_ side. If the enemy piece was hidden by an opponent, then your side cannot unmask the enemy piece.

In short, it will not work, unless anyone can unmask pieces that are not own by themselves.

I think we need a _key command_ configuration that will unmask a piece unconditionally. The module designer should of course take measures to not execute that command willy-nilly and only in the case of very specific events. Preferably, the _key command_ should only allow _named key commands_, so that a key short cut cannot trigger the unmasking.

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![kend626](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/k/eada6e/32.png) [@kend626](https://forum.vassalengine.org/u/kend626)\
**Post date:** [October 30, 2026, 12:29am UTC](https://forum.vassalengine.org/t/placing-spotted-marker-when-enemy-pieces-are-in-the-same-hex/90635/3 "2026-10-30T00:29:04Z")

</div>

I am just trying to drop a “spotted” marker in the hex. Both sides are invisible to the other player and are found by searching. The owning player is responsible for revealing the counter once spotted.

As far as I can tell the problem seems to be in the GKC matching expression. If I clear this field the marker is Spotted placed, but placed as soon as the piece is placed on the map, regardless of hex.

---

<div class="post-metadata">

**Author:** ![Benkyo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/benkyo/32/3289_2.png) [@Benkyo](https://forum.vassalengine.org/u/Benkyo)\
**Post date:** [October 30, 2026, 12:51am UTC](https://forum.vassalengine.org/t/placing-spotted-marker-when-enemy-pieces-are-in-the-same-hex/90635/4 "2026-10-30T00:51:07Z")

</div>

Aren’t the FastMatch to CurrentLocation and range limitation doing the same thing the CurrentHex check is trying to do? If so, could you not get the same result without the CurrentHex condition?

Presumably you need the != “Allied” check to stop the piece from sending the command to itself, so no check at all gets the result you described. What happens if you keep the != “Allied” check, and removed the CurrentHex check?

---

<div class="post-metadata">

**Author:** ![kend626](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/k/eada6e/32.png) [@kend626](https://forum.vassalengine.org/u/kend626)\
**Post date:** [October 30, 2026, 1:57am UTC](https://forum.vassalengine.org/t/placing-spotted-marker-when-enemy-pieces-are-in-the-same-hex/90635/5 "2026-10-30T01:57:07Z")

</div>

Tried removing the CurrentHex, no change. I even changed the expression to { Faction == “Japanese” }, no luck.

The piece either fires when I place it on the board, or It never fires depending on what I have in the GKC expression.

---

<div class="post-metadata">

**Author:** ![Benkyo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/benkyo/32/3289_2.png) [@Benkyo](https://forum.vassalengine.org/u/Benkyo)\
**Post date:** [October 30, 2026, 2:04am UTC](https://forum.vassalengine.org/t/placing-spotted-marker-when-enemy-pieces-are-in-the-same-hex/90635/6 "2026-10-30T02:04:34Z")

</div>

Sounds like a mistake has been made elsewhere.

---

<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 31, 2026, 12:48pm UTC](https://forum.vassalengine.org/t/placing-spotted-marker-when-enemy-pieces-are-in-the-same-hex/90635/7 "2026-10-31T12:48:13Z")

</div>

See [this example](https://drive.google.com/file/d/1uckg5VOgv_uk238sZorKw1PA3Mc7aEyH/view?usp=sharing) - please take it soon - I will delete it again.

Turns out, that non-owning side can send command to an invisible piece.

Open the above module, and switch between _Red_ and _Blue_ to see the hidden pieces. As _Red_ or _Blue_, move your piece to the location of the other piece. See that a gray piece is placed on top of the stack.

Yours,  
_Christian_
