VASSAL Reference Manual

Home > Module > Map > Line Of Sight Thread


Line Of Sight Thread

The Line of Sight allows players to use the mouse to draw a line between 2 points on the map to check for the availability of a Line of Sight between the two points.

There is no automatic checking if a Line of Sight exists by Vassal, this is up to the players to determine.

The Line of Sight component adds a Toolbar button to initiate the LOS display.

Description:

A brief description for your reference.

Button text:

The label on the Button in the Map Window’s Toolbar

Tooltip text:

Tooltip text for the Toolbar button.

Button icon:

Icon for the Toolbar button.

Hotkey:

Specifies a Keystroke or Named Command for the Toolbar button.

Toolbar button can be disabled by a property:

If this box is checked, you will be able to enable/disable the Toolbar Button by changing the value of a Global Property. See also: Toolbar Configuration

Global Property to disable this button when "true"

The name of a Global Property that will control when this Toolbar Button is enabled or disabled. If the property contains the string true, the button will be disabled; if it contains any other value the button will be enabled.

Button Icon when disabled:

If you select an alternative icon here, then that icon will be used when the button is currently disabled. If you leave the icon empty, then the normal icon, if any, will stay in place. Any button text for the toolbar button will be greyed out when the button is disabled, regardless of your choice in this field.

Report format:

A Message Format to display a message when a Line of Sight is finished being drawn. The following additional Properties can be used:

$FromLocation$ - The grid location of start of the LOS.

$ToLocation$ - The grid location of the end of the LOS.

$Range$ - The length in grid units of the LOS.

$NumberOfLocationsChecked$ - The number of different grid cells that the end of the LOS was dragged over.

$AllLocationsChecked$ - A list of all the grid locations of the different grid cells that the end of the LOS was dragged over.

Persistence:

Defines whether the LOS remains visible after the mouse is released to finish drawing the LOS. Options are:

Never - The LOS will never persist.

Always - The LOS will always persist

Ctrl+Click & drag - The LOS will persist if the Ctrl key is held down while drawing the LOS.

Note
A persisting LOS can be cleared by clicking on the LOS toolbar button again.
Visible to opponent:

Controls whether a LOS one player draws is visible to other players. Options are:

Never - The LOS is never visible to opponents.

Always - The LOS is always visible to opponents.

When persisting - The LOS is visible to opponents if it is persisting.

Force start of thread to snap to grid:

If unchecked, the LOS will start where the mouse is clicked. If checked, the LOS will start at the nearest snap point defined by the map grid.

Force end of thread to snap to grid:

If unchecked, the end of the LOS will follow the mouse cursor. If checked, the end of the LOS will jump to the nearest snap point defined by the map grid.

Draw range:

If checked, draws the range between the two points, in the current grid units of the board (hexes, squares or pixels).

Pixels per range unit (0 to use Grid calculation):

If drawing the range on a board without a grid, this determines how many pixels on the screen equal a single unit of range.

Round fractions:

For distances that are a fraction of a range unit, specify whether to round fractions up, down, or to the nearest whole number.

Hide pieces while drawing:

If checked, then all game pieces in the map will be hidden (or transparent) while the thread is being drawn.

Opacity of hidden pieces (0-100%):

Set the transparency of game pieces while the thread is being drawn. 0 is completely transparent, 100 is completely opaque.

Color:

Specifies the color of the LOS thread on the screen.

If set to null (by clicking the "Select" button and then the "Cancel" button in the color-choosing dialog), then a Preferences option will determine the color of the thread at game time.

LOS Thread