Navigation

    TripleA Logo

    TripleA Forum

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

    Change control of naval mine (AA unit)

    Map Making
    2
    3
    171
    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.
    • VictoryFirst
      VictoryFirst last edited by VictoryFirst

      Sometimes the naval mines in the game I am working on get captured by naval victories and are therefore controlled by the wrong nation because they function as Anti-Aircraft. I am trying to make a trigger to replace these mines with the correct ones if that happens, but it does not work.

      	<attachment name="conditionAttachmentWrongMineSZ11" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
      		<option name="alliedPresenceTerritories" value="SZ 11"/>
      		<option name="unitPresence" value="mines" count="1"/>
      	</attachment>
      
      	<attachment name="triggerAttachmentChangeToBerlinMine" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
      		<option name="conditions" value="conditionAttachmentWrongMineSZ11"/>			
      		<option name="changeOwnership" value="SZ 11:ANY:Germans:true"/>
      		<option name="when" value="before:russiansNonCombatMove"/>
      		<option name="when" value="before:frenchNonCombatMove"/>
      		<option name="when" value="before:britishNonCombatMove"/>
      		<option name="when" value="before:italiansNonCombatMove"/>
      		<option name="when" value="before:americansNonCombatMove"/>
      		<option name="when" value="before:austrohungariansNonCombatMove"/>
      		<option name="when" value="before:germansNonCombatMove"/>
      		<option name="when" value="before:ottomansNonCombatMove"/>
      	</attachment>
      

      I checked and the condition works, but the trigger doesn't change the mine to a German one.

      W 1 Reply Last reply Reply Quote 1
      • W
        wc_sumpton @VictoryFirst last edited by

        @victoryfirst

        All I did was add a territory attachment for SZ 11.

        <attachment name="territoryAttachment" attachTo="SZ 11" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
        	<option name="captureUnitOnEnteringBy" value="Germans"/>
        </attachment>
        

        Territories marked as "isWater" do not require territory attachments.

        Cheers...

        VictoryFirst 1 Reply Last reply Reply Quote 3
        • VictoryFirst
          VictoryFirst @wc_sumpton last edited by

          @wc_sumpton

          Thank you, it works now! Awesome! 😁

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