Trigger Not Firing Correctly
If I set "when" it won't fire at all. Set it to all possibilities and cycled through another round and still no go. Without when it fires and behaves correctly.
Also the "activateTrigger" doesn't fire at all, even when the trigger activating it does fire. If I remove when from it, it just fires all the time independent of the "activateTrigger".
What I'm after, is to have the first trigger fire, which will activate the second trigger, which will fire the next round as the first trigger will only fire once unless it's conditions are met again.
I have activate set to "1" because I'm just trying to get it to work but it'll be "99" when it works because I want it to activate the second one every time it fires.
This is what I have:
<attachment name="triggerAttachment_Japan_Controls_Okinawa" attachTo="Japanese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="conditions" value="conditionAttachment_False"/>
<option name="when" value="after:japaneseEndTurn"/>
<option name="resource" value="PUs"/>
<option name="resourceCount" value="1"/>
<attachment name="triggerAttachment_Japan_Liberates_Okinawa" attachTo="Japanese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_JapaneseEXP_PacificControlOkinawa"/> <option name="when" value="after:japaneseCombat"/> <option name="resource" value="PUs"/> <option name="resourceCount" value="1"/> <option name="activateTrigger" value="triggerAttachment_Japan_Controls_Okinawa:1:true:true:false:false"/> </attachment>
It seems as if it ought to be pretty straight forward, but I've been stuck for a while now. Any help is appreciated.
@beelee Your trigger has Covid
@hepps lol It's only at 52% doesnt get it's 2nd shot for another 8 days
I don't really have any input on why it's not working. I'm wondering if another approach would be to have the first trigger set a switch to "true" and make the second trigger dependent on the switch.
@contango well it appears my side effects were more severe than thought. I'm gonna try "after:japaneseBattle" instead of "after:japaneseCombat" lol
@beelee well bummer. That didn't work either. It only fire when I remove "when" . What's the default for no "when' ? before endTurn ?
Hmm...well back at it
@beelee Maybe try making it a 1 use trigger, so when is not so important.
@rogercooper yea i tried it at 1 just to try and get it to work. What's weird is that it fires if I don't set when
The problem might be with the conditions/'when'. I think control of a territory after battle is not changed until 'endTurn' so checking 'after:japanCombat' will always be false. By removing the 'when' the trigger is checked at 'endTurn' and fires.