RestrictCommands

From VASSAL
Jump to: navigation, search

VASSAL Reference Manual

Home > Module > Game Piece Palette > Game Piece > Restrict Commands


Restrict Commands

RestrictCommands.png

This trait allows you to disable or completely remove certain keyboard commands from a piece when certain conditions apply.

Description: A name for identification purposes
Restriction: Select Hide to remove a command from the right-click menu entirely. Select Disable to disable (gray out) the command. In either case, the restricted action will not be invoked when its corresponding keyboard combination is pressed.
Restrict when properties match: The commands will be restricted when the properties of this piece match the given expression
Restrict these Key Commands: Specify the keyboard commands that will be hidden/disabled. The corresponding right-click menu item (if any) will also be restricted.

Example: A piece may remove certain commands based on where it is on the map by matching the CurrentZone property. A piece with a Layer specifying a damage level may disable commands based on the Level property of that Layer.