TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    DestroyedWhenCapturedBy is not working

    Scheduled Pinned Locked Moved Map Making
    5 Posts 3 Posters 1.9k Views 3 Watching
    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.
    • RogerCooperR Offline
      RogerCooper
      last edited by

      DestroyedWhenCaptueredBy is not working

          <attachment name="unitAttachment" attachTo="factory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
              <option name="isFactory" value="true"/>
              <option name="destroyedWhenCapturedBy" value="police"/>
          </attachment>
      

      0_1509317651059_newyawk.zip I have uploaded the whole mod if you want to see it in context.

      HeppsH redrumR 2 Replies Last reply Reply Quote 0
      • HeppsH Offline
        Hepps Moderators @RogerCooper
        last edited by

        @rogercooper Should probably reference this with an engine release.

        "A joyous heart sours with the burden of expectation"
        Hepster

        1 Reply Last reply Reply Quote 0
        • redrumR Offline
          redrum Admin @RogerCooper
          last edited by redrum

          @rogercooper Did you verify that property "Units Can Be Destroyed Instead Of Captured" is set to true? Which XML are you testing as there are 2? If you have a save game to reproduce that would help.

          I glanced at the XML and that property is missing. You need to add:
          <property name="Units Can Be Destroyed Instead Of Captured" value="true" editable="false">
          <boolean/>
          </property>

          TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

          RogerCooperR 1 Reply Last reply Reply Quote 0
          • RogerCooperR Offline
            RogerCooper @redrum
            last edited by

            @redrum said in DestroyedWhenCapturedBy is not working:

            <property name="Units Can Be Destroyed Instead Of Captured" value="true" editable="false">
            <boolean/>
            </property>

            That worked. Thanks for the help. Those property dependencies are always a nuisance.

            redrumR 1 Reply Last reply Reply Quote 0
            • redrumR Offline
              redrum Admin @RogerCooper
              last edited by

              @rogercooper Yeah, I'd like to eventually get rid of some of the properties as they are really unnecessary. Only benefit they provide is if you want to allow them to be editable game options and the map works well both ways but honestly that is pretty rare.

              TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post
              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums