Action button as a spring Toggle Switch

Hope you are all doing well and having a great weekend. :beer:

My problem is thus: I am trying to emulate a flipper switch that goes on briefly then turns off again. The switch resets some counters on my Tactical display to their original position.

I have a layer which represents the toggle in on and off position…

…and an Action Button Trait to allow a mouse action to “flick” the toggle…

The Action Button activates a Global hotkey to a GKC which resets the Marker’s position…

…and a Trigger which picks up the command sent to the Hotkey and is supposed to activate the Level which represents toggle on. After that, the Trigger should switch it off again.

Thing is I can’t see any change in the Toggle, the best I can get is for the switch to remain on or not be on at all. I have tried rearranging the commands going through the Trigger and an extra Trigger to control the off or on Levels for the Layer as well as not using the Loop function at all. I realise it is also possible that the change happens so quickly that I don’t notice anything in which case - Is there some way I can make a timer of a second or something before the switch returns to off again? Otherwise I will have to settle for another boring old button :slightly_smiling_face:. I thought a Toggle switch would be cool.

There is a link below to download the module if someone feels like having a look and the Traits live here on the Tree…

The game will set up with all this available so nothing much to it, just move some of the counters with the red MG on them around then mouse click the toggle and the Markers should return but the switch does not appear to change at all.

Thank you all once again.


What you are experiencing is standard Vassal behaviour. To my understanding, Vassal processes the entire action (including button on / off again) before refreshing the display. The Alert() function will interrupt this but not in a way that would be satisfactory for you here. There is no Timer() function at the moment but it has been discussed, probably on more than one occasion.

Vassal v3.7 is in development at the moment. Perhaps a request for a new function would be considered. Alert() might even serve as a template.

1 Like

Doh!! I will have to find somewhere else to use this toggle. Boring ol’ button it will have to be then. Thanks for the quick answer Mark.