Navigation

    TripleA Logo

    TripleA Forum

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

    Error with Trigger Attachment

    Map Making
    trigger
    3
    9
    384
    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.
    • RogerCooper
      RogerCooper last edited by

      I am getting an error with the following attachments.

          <attachment name="conditionAttachmentTurn1" attachTo="British" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
            <option name="rounds" value="1"/>
          </attachment>
          
          <attachment name="triggerAttachmentTest" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
            <option name="conditions" value="conditionAttachmentTurn1"/>
            <option name="placement" value="Celtic Sea Zone:Battleship"/>
            <option name="when" value="before:germanPurchase"/>
          </attachment>
      

      I receive the error "Unexpected Exception while setting values for attachment: TriggerAttachment attached to: Player Id named: British with name:triggerAttachmentTest.

      What I am doing wrong

      C 1 Reply Last reply Reply Quote 0
      • C
        Cernel Moderators @RogerCooper last edited by

        @RogerCooper I might be overlooking something, but looks all good to me. Assuming the zone and unit names are correct, maybe see if you have another trigger called "triggerAttachmentTest" in that xml.

        RogerCooper 1 Reply Last reply Reply Quote 0
        • LaFayette
          LaFayette Admin last edited by

          @RogerCooper

          Which version of the game are you using? 1.9 or 2.0

          Could you attach a full XML zipped attachment for us to look at?

          Are you getting more information in the console window or an option to report the error if 2.0?

          RogerCooper 1 Reply Last reply Reply Quote 0
          • RogerCooper
            RogerCooper @Cernel last edited by

            @Cernel It should have been

                <attachment name="triggerAttachmentTest" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                  <option name="conditions" value="conditionAttachmentTurn1"/>
                  <option name="placement" value="Celtic Sea Sea Zone:battleship"/>
                  <option name="when" value="before:germanPurchase"/>
                </attachment>
            
            

            There is no error message, but it still does not fire. Is there a way of testing whether conditionAttachment is being met or a trigger firing?

            C 1 Reply Last reply Reply Quote 0
            • RogerCooper
              RogerCooper @LaFayette last edited by

              @LaFayette I fixed the syntax error but it is still not firing. I am using 2.0 and no error is appearing in the console window.

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

                Will probably need a zipped copy of the map to dig into this.

                1 Reply Last reply Reply Quote 0
                • C
                  Cernel Moderators @RogerCooper last edited by Cernel

                  @RogerCooper said in Error with Trigger Attachment:

                  @Cernel It should have been

                      <attachment name="triggerAttachmentTest" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                        <option name="conditions" value="conditionAttachmentTurn1"/>
                        <option name="placement" value="Celtic Sea Sea Zone:battleship"/>
                        <option name="when" value="before:germanPurchase"/>
                      </attachment>
                  
                  

                  There is no error message, but it still does not fire. Is there a way of testing whether conditionAttachment is being met or a trigger firing?

                  Either:

                  • You have another condition called "conditionAttachmentTurn1".
                  • You have another trigger called "triggerAttachmentTest".
                  • The "when" is not referring to the phase you are looking at (the "when" is not validated, so it might even be an inexistent phase).
                  1 Reply Last reply Reply Quote 0
                  • C
                    Cernel Moderators last edited by

                    Of course, still as long as the zone and unit names are correct. Are you sure that "Celtic Sea Sea Zone" is not, maybe, "Celtic Sea Zone"? However, if there are any issues in any of them and you are not getting errors, I guess that's a problem too.

                    RogerCooper 1 Reply Last reply Reply Quote -1
                    • RogerCooper
                      RogerCooper @Cernel last edited by

                      @Cernel Of course the issue was that I forget to set "Use Triggers" to true.

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