DestroyedWhenCapturedBy is not working
-
DestroyedWhenCaptueredBy is not working
<attachment name="unitAttachment" attachTo="factory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isFactory" value="true"/> <option name="destroyedWhenCapturedBy" value="police"/> </attachment>
0_1509317651059_newyawk.zip I have uploaded the whole mod if you want to see it in context.
-
@rogercooper Should probably reference this with an engine release.
-
@rogercooper Did you verify that property "Units Can Be Destroyed Instead Of Captured" is set to true? Which XML are you testing as there are 2? If you have a save game to reproduce that would help.
I glanced at the XML and that property is missing. You need to add:
<property name="Units Can Be Destroyed Instead Of Captured" value="true" editable="false">
<boolean/>
</property> -
@redrum said in DestroyedWhenCapturedBy is not working:
<property name="Units Can Be Destroyed Instead Of Captured" value="true" editable="false">
<boolean/>
</property>That worked. Thanks for the help. Those property dependencies are always a nuisance.
-
@rogercooper Yeah, I'd like to eventually get rid of some of the properties as they are really unnecessary. Only benefit they provide is if you want to allow them to be editable game options and the map works well both ways but honestly that is pretty rare.