Navigation

    TripleA Logo

    TripleA Forum

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

    consumesUnit

    Map Making
    2
    3
    256
    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.
    • N
      Numetalfan last edited by

      Hello,
      <attachment name='unitAttachment' attachTo='gun_bunker' javaClass='UnitAttachment' type='unitType'>
      ...
      <option name='consumesUnits' value='1:bunker'/>
      <option name='consumesUnits' value='1:artillery'/>
      ...
      </attachment>

      I understand this example as an AND-operator
      this means BOTH the bunker and the artillery are consumed by the new unit, here the gun-bunker

      --

      But this is not what I am looking for, I look for a code line that is an OR-operator

      which means: EITHER a bunker or an artillery can be consumed
      if this is possible of course

      Do I have to make two commands out of one, like:

      <attachment name='unitAttachment' attachTo='gun_bunker' javaClass='UnitAttachment' type='unitType'>
      <option name='consumesUnits' value='1:bunker'/>
      </attachment>

      <attachment name='unitAttachment' attachTo='gun_bunker' javaClass='UnitAttachment' type='unitType'>
      <option name='consumesUnits' value='1:artillery'/>
      </attachment>

      1 Reply Last reply Reply Quote 0
      • N
        Numetalfan last edited by

        Hmmm,

        I thought only about situations where there is only unit X or unit Y. But what if both of them are in the same territory....

        This seems to be the problem.

        So this would require a user action and things become more complicated.

        Damn. I did want to have two updates, but I see nothing better

        So
        Unit a. Update for a. Consumes a
        Unit b. Update for b. Consumes b

        Anyone a better idea?

        Hepps 1 Reply Last reply Reply Quote 0
        • Hepps
          Hepps Moderators @Numetalfan last edited by

          @Numetalfan Seems strange to have (what I would presume to be) 2 very different units being used to create the same defensive unit upon merging.

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