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

    placement/removeUnits Question

    Scheduled Pinned Locked Moved Map Making
    23 Posts 7 Posters 8.4k Views 7 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 @beelee
      last edited by

      I designed conditions and a trigger:

      <attachment name="triggerSpaintoPro-Axis" attachTo="Pro-Axis" javaClass="TriggerAttachment" type="player">
      <option name="when" value="after:Pro-AlliesCombatMove"/>
      <option name="conditions" value="conditionAttachmentalliedbattlespain:conditionAttachmentobjectiveG4cn"/>
      <option name="removeUnits" value="Spain:all"/>
      <option name="changeOwnership" value="Spain:any:Pro-Axis:false"/>
      <option name="placement" value="Spain:pa_infantry" count="3"/>
      <option name="uses" value="1"/>
      </attachment>

      everythings works..
      ....except:
      <option name="removeUnits" value="Spain:all"/>

      all original (neutral) units there remain. What can be the reason for that?

      B 1 Reply Last reply Reply Quote 0
      • B Offline
        beelee @Numetalfan
        last edited by

        @numetalfan so Spain is a True Neutral that changes into a Pro-Axis Neutral ?

        If so you might need to remove the Neutral units before it changes ownership to pro-axis and then add them back as pro-axis after if needed.

        You'd probably need separate triggers.

        This is just a guess

        wc_sumptonW 1 Reply Last reply Reply Quote 0
        • wc_sumptonW Offline
          wc_sumpton @beelee
          last edited by

          @Numetalfan

          The units do not belong to Pro-Allies. 'removeUnits' is looking into Spain and removing all Pro-Allies units.

          Cheers...

          N 1 Reply Last reply Reply Quote 0
          • N Offline
            Numetalfan @wc_sumpton
            last edited by

            @wc_sumpton

            so in the placement phase it is

            <unitPlacement unitType="infantry" territory="Spain" quantity="3"/>

            so no owner nation.
            but the trigger has to be attached to someone

            the units are located in:
            ...\units\Neutral

            my first idea:

            <attachment name="triggerSpaintoPro-Axis1" attachTo="Neutral" javaClass="TriggerAttachment" type="player">
            <option name="when" value="after:Pro-AlliesCombatMove"/>
            <option name="conditions" value="conditionAttachmentalliedbattlespain:conditionAttachmentobjectiveG4cn"/>
            <option name="removeUnits" value="Spain:all"/>
            <option name="uses" value="1"/>
            </attachment>

            does not work, maybe it's because of
            attachTo="Neutral

            how to solve this ?

            B TheDogT 2 Replies Last reply Reply Quote 0
            • B Offline
              beelee @Numetalfan
              last edited by

              @numetalfan so Spain has changed to "Neutral_Axis" or w/e you have in your game. So try the attachTo="Neutral_Axis"

              1 Reply Last reply Reply Quote 0
              • wc_sumptonW Offline
                wc_sumpton
                last edited by

                @Numetalfan

                I am sorry, but I don't have a simple answer. The only way I am able to remove 'Neutral' units it to have a 'Neutral' player. '<option name="players" value="Neutral"/> dose not seem to work.

                Again sorry. 😞

                Cheers...

                C 1 Reply Last reply Reply Quote 1
                • C Offline
                  Cernel Moderators Lobby Moderators @wc_sumpton
                  last edited by Cernel

                  @wc_sumpton said in placement/removeUnits Question:

                  @Numetalfan

                  I am sorry, but I don't have a simple answer. The only way I am able to remove 'Neutral' units it to have a 'Neutral' player. '<option name="players" value="Neutral"/> dose not seem to work.

                  Again sorry. 😞

                  Cheers...

                  I think @redrum already clarified that the "Neutral" player is sort of a program hack to support simple "neutral" defensive units. For anything more complex than that, I believe you are supposed to have an actual player, hiding it and pre-assigning it to "Does Nothing".

                  1 Reply Last reply Reply Quote 2
                  • TheDogT Online
                    TheDog @Numetalfan
                    last edited by

                    @numetalfan
                    Try using a pseudo player, I call them "none", with a

                    <player name="none" optional="false" canBeDisabled="false" defaultType="DoesNothing" isHidden="true"/>

                    https://forums.triplea-game.org/tags/thedog
                    https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

                    N 2 Replies Last reply Reply Quote 1
                    • N Offline
                      Numetalfan @TheDog
                      last edited by

                      @all

                      I will try that, thx

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        Numetalfan @TheDog
                        last edited by

                        @thedog

                        now everything works!

                        1 Reply Last reply Reply Quote 2

                        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
                        • 2
                        • 2 / 2
                        • First post
                          Last post
                        Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums