Create account / Log in

How To make the map snap to a Ctrl-Mouse-Click

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

How To make the map snap to a Ctrl-Mouse-Click

Postby PaulC » June 14th, 2016, 10:59 am

I have a new module that I want to snap to an area of the map using the Ctrl-Left-Mouse-Button and then display a red circle in the hex I snapped to until the button is released; in the same way the VASL module does. The problem is that I can't figure out how it does it... so it has to be a trick.

Does anyone know how to do this, or how it was done in the VASL module?
PaulC
 
Posts: 28
Joined: June 4th, 2016, 1:57 am

Re: How To make the map snap to a Ctrl-Mouse-Click

Postby PaulC » June 25th, 2016, 11:46 am

Does anyone know how the VASL game module allows players to move to a Main Map hex location through a hot-key?

Are there any other game modules out there that 'snap' to a hex location that I can look at as an example?

The problem that I'm tying to solve is to have both opponents looking at the same area of a large map while the phasing player is moving. The alternative is to tell the opponent to move his map view to that location, which will be frustrating for the non-phasing player. Since not all actions result in a piece moving, I want to change the non-phasing player's map focus.

Thanks
PaulC
 
Posts: 28
Joined: June 4th, 2016, 1:57 am

Re: How To make the map snap to a Ctrl-Mouse-Click

Postby rrvs » July 3rd, 2016, 2:55 pm

I don't know VASL, and assume Center on Opponent's Moves won't work because you have those invisible pieces moving around that you don't want indicated, is that right?

If I'm wrong, and Center on Opponent's Moves is on, but just won't trigger with all the actions you're after... then you could have those actions also run a Place Marker over the piece, then have the 'keystroke to apply to the marker piece" be a delete key. Hope that makes sense, but I think that would then have any action draw the focus to that piece (if Center on Opponent's Moves is always on).

I haven't tested this, just throwing it out there. Hopefully though you can get something more like what you're after.
rrvs
 
Posts: 175
Joined: May 20th, 2016, 1:17 pm

Re: How To make the map snap to a Ctrl-Mouse-Click

Postby PaulC » July 15th, 2016, 6:44 pm

I'm trying to get the same behavior that they implemented in the VASL module. If you want your opponents view of the map to move to an area that you are discussing, you would CTRL-Mouse click on the hex (which could be empty) and a red ring would be displayed, on the other side, your opponents map centers on that hex. This avoids all the "In hex 23.43" communication, because his map will center on the hex your talking about and he will also see the red ring.

For an example, you need to tell your opponent that your preforming an artillery strike on a hex, which shouldn't have any of your own counters in it. So this ability to move the opponents map is an important feature, so much so, that I'm very surprised that it isn't already an inherent aspect of the VASSAL design infrastructure.
PaulC
 
Posts: 28
Joined: June 4th, 2016, 1:57 am

Re: How To make the map snap to a Ctrl-Mouse-Click

Postby Robbie » July 15th, 2016, 8:32 pm

I am not 100% sure but I think this has been coded into the Vasl module and is not something hat has been done using the normal Vassal attributes. It might be worth posting on Gamesquad in the Vasl section and asking if one of the developers would like to share the secret.
Robbie
 
Posts: 55
Joined: July 20th, 2010, 10:46 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 7 guests