Hi to all!

Two questions :

a) There is a way to calculate the distance in hexes between two counters on a map with hexagonal grid without using the LOS thread?

b) There is a function to calculate the square root of an integer value?

Thanks in advance for your support on that matter.

Panther 2010

I haven’t tried it to be sure, but you’d need a Calculated Property and then see if the Beanshell expression for a square root is supported. Looks like it should be:

`Math.sqrt(your-property-name-here)`

Hello JoelCFC25,

many thanks for your quick reply to my question.

The Beanshell expression for a square root is supported and now I’m able to calculate square roots and, then, calculate the distance between two hexes on the map. Great!

Unfortunately, in certain circumstances, I noticed that the calculated distance and the range of the LOS thread are different.

For instance, the calculated distance (in hexes) between hex 1101 and hex 0106 is 11, while the range of the LOS thread is 10.

At this point, the only thing that could really help me to solve this problem is to give a look at the source of the LOS thread, to try to understand what I’m doing wrong.

Where I can find the source of the LOS thread in the Vassal forum?

Thank you again for your great help.

Panther 2010