Create account / Log in

Trigger Action menu item grayed out

Issues with the Vassal engine.

Moderators: uckelman, Tim M

Trigger Action menu item grayed out

Postby jmichael » December 2nd, 2019, 5:27 am

VASSAL 3.2.17

I defined a Trigger Action on a game piece. I filled in "Menu Command", but left "Keyboard Command" and "Watch for these Keystrokes" blank. While in the editor, right-clicking on the game piece representation at the top of the game piece properties window, there is a menu item for the Trigger Action, but it is grayed out. If I exit the editor (saving the module), open the module, place the piece, right-click, the menu item is no longer grayed out, but clicking does not produce any indication of having executed the list of commands in the Trigger Action.

If I fill in the "Keyboard Command", within the editor the menu item is still grayed out. Exiting the editor and opening the module, the menu item is not grayed out, and now clicking on it *does* produce the expected results of executing the string of commands in the Trigger Action.

Does every functional menu item *have* to have a "Keyboard Command"? Was it wrong for the menu item to *not* be grayed out when there was no "Keyboard Command"?
Posts: 8
Joined: November 14th, 2019, 4:27 pm

Re: Trigger Action menu item grayed out

Postby JoelCFC25 » December 2nd, 2019, 2:15 pm

A piece trait (e.g. a Trigger Action) must have a keyboard command defined to actually function. The corresponding Menu Command may be omitted, which stops the command from being displayed in a right-click context menu on the piece, but the key command will still function. This usage is common and handy for any moderately complex logic where you want certain automated steps to occur in a sequence but *not* be purposely/accidentally triggered by the user.

I guess I have never tried right-clicking a piece while in the Editor to see what happens--I would not take behavior in the Editor to be representative of what you'll see/experience during actual play.
Posts: 698
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Trigger Action menu item grayed out

Postby Cattlesquat » February 5th, 2020, 3:00 pm

As far as the greying out -- some commands are automatically greyed out when the piece is still not yet placed in the game e.g. on a markers palette: IF the command references something that wouldn't have been created about the piece yet. So for example you can't "Delete" a piece on a markers palette. And anything that references a CalculatedProperty is greyed out, since the piece doesn't "really" exist yet. I actually use this as a trick to get certain things I want greyed out on the markers palette -- I define a calculated property NotOnPalette whose expression is simply 1==1, and reference it in the Triggers (e.g. flipping) that I don't want being executed before the marker is placed in the world. So I'm guessing your trigger that was getting greyed out probably referenced something (e.g. deleting, a calculated property, or some other such element) that made Vassal grey it in that situation -- but then once you drag it onto the map in the game, it's fine.

And you were running into the separate thing Joel already mentioned (must have Keyboard command to function). Always extra confusing when you it a "two overlapping problems" situation!
User avatar
Posts: 515
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Return to Technical Support & Bugs

Who is online

Users browsing this forum: Bing [Bot] and 1 guest