consumesUnit



  • 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>



  • 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?


  • Moderators

    @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.


Log in to reply