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

    consumesUnit

    Scheduled Pinned Locked Moved Map Making
    3 Posts 2 Posters 581 Views 2 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.
    • N Offline
      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 Offline
        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?

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

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

          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