Can't get a repeated trigger action to work

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?

Bug [2806183]: Trigger action fails to execute another TA more than once

Trigger Action loops do not work like the way you have set it up in your
demo mod, so this is not necessarily a bug - I’ll leave that call to Brent.

To see how an increment TA loop works take a look at the To Be King module.
Plenty of examples of how to do this in there

Post generated using Mail2Forum (mail2forum.com)

Actually, I don’t think the released version of To Be King has those traits in it. It’s the new and improved version that’s currently in limbo that has all the repeating stuff in it.

On 14/06/2009 at 5:46 AM Bigtex01 wrote:

Ok, This took a little while to sort out.

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.

Joel, fix committed to swampwallaby-3.1@5725

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Provided multiple triggers are open with no restricting PME only then is it
broken correct?

Post generated using Mail2Forum (mail2forum.com)

I’m not sure I understand your question.

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.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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 :slight_smile:

Post generated using Mail2Forum (mail2forum.com)

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.

Thus spake “Brent Easton”:

Merged to 3.1@5726, trunk@5727.

The merge to the trunk was rather rough. You should look at the result
to make sure that I didn’t break anything.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Looks good.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Brent, Found it.
Seems I was thinking of bug 2551552, infinite loops.
Presumably this is unaffected by the new fix? :slight_smile:

Post generated using Mail2Forum (mail2forum.com)

Tim,

The new fix is just using the infinite loop detection scheme we developed to fix 2551552 to replace the broken loop detection in Trigger Actions.

Cheers,
Brent.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)