I have a right click Trigger Action menu item on a piece which sends a key (CTRL I) to trigger a second Trigger Action menu item. However, even though a Report Action shows that the CTRL I keystroke is being sent, the Trigger Action that is started by CTRL I will only fire once, even though CTRL I is listed several times in a row in the first trigger action.
Can someone explain why in this test module CTRL I is firing, but the Trigger Action it supposedly triggers is not executing more than once?
Essentially, the current Trigger Action trait has some code to try and prevent infinite loops caused by a Trigger triggering itself. This code isn’t doing what it is supposed to do and is also preventing multiple calls to other triggers.
I have replaced the code with the new-style infinite loop handling we are using and this appears to have resolved the problem.
Modules that depend on multiple triggers not firing may now break, but it is clearly a bug and not logical for a module to be set up that way, so I don’t see this as a problem.
If trigger A spcifies the Control key for trigger B twice in the ‘Perform these keystrokes’ section, currently, Trigger B will only be performed once, even though it is specified twice.
Once the fix has been applied, trigger B will be performed twice as you would expect.
If a module accidently has triggers specifying other triggers more than once, then once the fix is applied, they will start executing their trigger B’s more than once and may appear to ‘break’. Basically, their module has a bug in it, but the bug is being masked by a bug in VASSAL.
Don’t worry about it then. Just a nagging feeling this was handled before a
long time ago for another reason, but don’t remember what. Will have to go
through mail to see what it was, if anything at all
I sure would like to see some examples of loops and repeats and all that. If the To Be King module with these items is not yet available, are there other forum threads that discuss this? I tried a couple of searches for them but came up pretty empty and am trying to figure out loops on my own from scratch. I’d rather not reinvent the wheel if I don’t have to.