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

    Trigger createsUnitsList count from 1 to 0 ?

    Scheduled Pinned Locked Moved Map Making
    5 Posts 3 Posters 1.3k 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.
    • FrostionF Offline
      Frostion Admin
      last edited by

      I have a trigger that at some point must modify a unit called “Marryk. It goes like this…

      <option name="unitProperty" value="createsUnitsList" count="1:Battle-Chicken"/>
      

      But I would also like to have it so, that when the unit “Battle-Chicken” unit is on the map, then Marryk unit does no longer generate 1:Battle-Chicken at end of turn. Then of course tried this…

      <option name="unitProperty" value="createsUnitsList" count="0:Battle-Chicken"/>
      

      But this results in an error:
      When0Battle-Chicke.png

      I cannot just use the count="-reset-" as this would also remove any other units that Marryk is generating.

      Why does the "0:Battle-Chicken" not work and just override the "1:Battle-Chicken", but instead give an error?

      Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

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

        Currently there is a check that the value is greater than 0 otherwise it throws an error. So for example, if you made the count 2 then it would work. I would have to think about whether that limitation can be changed to allow setting to 0.

        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
        • redrumR Offline
          redrum Admin
          last edited by

          @Frostion I did a quick check and looks like 0 can be allowed and shouldn't cause any issues. Here is a quick PR: https://github.com/triplea-game/triplea/pull/6373. Once that is merged, you can test with the latest pre-release to see if that solves it.

          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 1
          • FrostionF Offline
            Frostion Admin
            last edited by

            @redrum Nice 🙂 I will keep an eye out for this.

            Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

            1 Reply Last reply Reply Quote 0
            • Michael HooverM Offline
              Michael Hoover
              last edited by

              Me too - this has some intriguing applications...

              Map Maker of: Twelve Clans and Labyrinth

              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