Page 1 of 1

Prevent drag and drop?

PostPosted: June 2nd, 2016, 7:17 am
by harm
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

Re: Prevent drag and drop?

PostPosted: June 2nd, 2016, 9:33 am
by Dulgin
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

Re: Prevent drag and drop?

PostPosted: June 2nd, 2016, 9:45 am
by harm
try the "Does not Stack"-Trait.


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

Many thanks!

Re: Prevent drag and drop? Update

PostPosted: June 2nd, 2016, 1:32 pm
by harm
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.

Re: Prevent drag and drop?

PostPosted: June 9th, 2016, 2:31 pm
by Tim M
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 :)

Re: Prevent drag and drop?

PostPosted: June 9th, 2016, 3:57 pm
by harm
Excellent! I've no problem with frustrating players when it eases my personal module design frustration somewhat.

Re: Prevent drag and drop?

PostPosted: June 11th, 2016, 3:26 pm
by Dulgin
If you will not frustrate players you can report a message like "movment isn't allowed" if the "Send back" ist triggert.