Prevent drag and drop?

Is it possible to prevent units being dragged to another – non-private – map window? I would like to allow the movement between map windows by context menu command only.

The reason: I have unit strengths/steps counted in different zones of a map window (a forces display). Moving units between zones works as nicely as deleting and adding units to that window. Transferring units by Key Command to another map window is also working but not to deduct their values when units are merely dragged out of the “forces” map window.

Any direct help is as much appreciated as any workaround suggestions.

Matthias

Hi Matthias,

try the “Does not Stack”-Trait.
Set “Move piece” to never and “Select piece” to normal.
Then you can use then “Send to”-Traitt.

Ingo

That, unfortunately, would prevent moving the pieces within a map window which is needed.

Many thanks!

Actually, the units are changing the Dynamic Property named counted properly to “no” when dragged out of the window, nevertheless the Global Property which does the counting remains idle.

You cant physically prevent drag and drop between maps except by setting DNS to ‘move never’ but as you note you cant move within a map.

You can however circumvent drag n drop between maps by using the STL trait’s Send Back Keyboard Command in conjunction with a trigger that listens for the map field key command ‘apply to all units ending movement on this map’ to have the piece immediately return to its old location.

It will frustrate players used to drag n drop however and they will probably think something is wrong when they cant move pieces this way and it keeps snapping back to its previous map :slight_smile:

Excellent! I’ve no problem with frustrating players when it eases my personal module design frustration somewhat.

If you will not frustrate players you can report a message like “movment isn’t allowed” if the “Send back” ist triggert.