Navigation

    TripleA Logo

    TripleA Forum

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

    Trigger createsUnitsList count from 1 to 0 ?

    Map Making
    3
    5
    148
    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

      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?

      redrum 1 Reply Last reply Reply Quote 0
      • redrum
        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.

        1 Reply Last reply Reply Quote 0
        • redrum
          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.

          ron-murhammer created this issue in triplea-game/triplea

          closed createsUnitsList can be zero #6373

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

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

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

              Me too - this has some intriguing applications...

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