unit is getting captured when i lose the battle, and i can't figure out why
-
<attachment name="unitAttachment" attachTo="smokegrenade" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="movement" value="1"/> <option name="attack" value="0"/> <option name="defense" value="0"/> <option name="isInfrastructure" value="true"/> <option name="destroyedWhenCapturedFrom" value="XCOM"/> </attachment> -
@ff03k64 it's because it's isInfrastructure. Idk of a solution.
I guess you could have them destroyed when captured. Or at least I think you can
-
Maybe i should describe what i am going for and see if there are suggestions for another way to do it. I want this unit to support units in the battle (negative support enemies in this particular case), but i don't want it to be able to be picked as a casualty.
-
@ff03k64 what map? some maps give you an option for "destroy" or "capture" units.
-
@SilverBullet I am making a map
-
@ff03k64 ahh, then another map maker needs to answer that, but the Napoleon map has that option.
-
@SilverBullet Do you know what unit has it?
-
@ff03k64 in Napoleon you can set the option to either destroy or capture "generals" or "encampments", so i dont think it is a unit thing but an option thing.
-
@SilverBullet Okay, i will at least check those units out though. Thanks!
-
@ff03k64 good luck!
-
Thanks you!
-
@ff03k64 yea I got a unit I don't want as a hitpoint either. I made it infrastructure like you have but it would get captured if a lost battle. It was a strategic bomber so the situation rarely occurred.
However, I'm noticing with 2.2 it's being offered as a hit point and I don't remember that with 13066. Unfortunately my OS is all jacked up and I can get 13066 to work anymore so I can't check to see if that is the actual case.
-
Check this property:
<!-- if true, units with destroyedWhenCapturedBy will be destroyed instead of captured. only applies to non-combat units, since combat units die in combat --> <property name="Units Can Be Destroyed Instead Of Captured" value="true" editable="false"> <boolean/> </property>Cheers...
-
@wc_sumpton That was it, thanks!
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