Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    Help with trigger activating a supportAttachment

    Map Making
    2
    5
    468
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Frostion
      Frostion Admin last edited by Frostion

      I hope someone can help 😕

      I want to make a trigger that fires when a specific unit is in a specific place. The trigger must turn on a supportattachment that makes a specific unit support itself +1 AA when on offence and on defense.

      On my World of War Heroes map it is like this:
      When the unit “Amulet-of-Accuracy” is present in the territory “Arthur Backpack” then the unit “Arthur” is henceforth affected by a support attachment where “Arthur” supports himself.

      I have tried to make the supports attachment, the condition and the trigger. But it does not seem to work. The unit "Arthur" does is not become +1 stronger in AA when it comes down to it. Is there anyone who can spot why this does not work?

          <attachment name="supportAttachmentHero-of-Humans-uses-Amulet-of-Accuracy" attachTo="Arthur" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
              <option name="unitType" value="Arthur"/>
              <option name="faction" value="allied"/>
              <option name="side" value="offence:defence"/>
              <option name="dice" value="AAstrength"/>
              <option name="bonus" value="1"/>
              <option name="number" value="1"/>
              <option name="bonusType" value="Amulet of Accuracy +1 Ranged Power"/>
          </attachment>
      

      (...)

          <attachment name="conditionAttachmenHumans-have-Amulet-of-Accuracy-in-backpack" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
              <option name="directPresenceTerritories" value="Arthur Backpack" count="1"/>
              <option name="unitPresence" value="Amulet-of-Accuracy" count="1"/>
          </attachment>
      
          <attachment name="triggerAttachmentHero_of_Humans_has_the_Amulet-of-Accuracy" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachmenHumans-have-Amulet-of-Accuracy-in-backpack"/>
              <option name="support" value="supportAttachmentHero-of-Humans-uses-Amulet-of-Accuracy"/>
              <option name="uses" value="1"/>
          </attachment>
      

      Unavngivet.png

      redrum 1 Reply Last reply Reply Quote 0
      • redrum
        redrum Admin @Frostion last edited by

        @Frostion You should probably add a "when" to the trigger. Are you seeing the trigger fire and the support attachment not work or are you not seeing the trigger fire at all?

        1 Reply Last reply Reply Quote 2
        • Frostion
          Frostion Admin last edited by

          I dont see the the trigger activating in history. I will try to add a "when" and see what happens ☺

          1 Reply Last reply Reply Quote 0
          • Frostion
            Frostion Admin last edited by

            I added a “when” to this trigger, but it still did not work.
            Then I redefined the “whens” of other triggers also belonging to the “Humans” player, as there were other triggers also firing at the same time (after humansEndturn).

            Suddenly it worked! 😄 Arthur can now use the Medallion of Accuracy item in combination with his new Magic Bow ranged weapon. I hope it will keep on working even after I add some more item triggers to the map.

            Right now Arthur the Paladin is ready to take on the evil red dragon that is tormenting Northshire 😉

            Unavngivet.png

            redrum 1 Reply Last reply Reply Quote 1
            • redrum
              redrum Admin @Frostion last edited by redrum

              @Frostion Good to hear. My general advice is that you should make sure that all triggers specify "when" otherwise I think you can sometimes get strange behavior and are relying on some magic trigger defaults on when they fire.

              Also, I'm guessing you are using SupportAttachments for the items instead of just having them increase the base values as there are multiple items that could increase the AA strength for heroes?

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums