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

    trigger question - unit with hit

    Scheduled Pinned Locked Moved Map Making
    36 Posts 4 Posters 6.0k Views 4 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.
    • B Offline
      beelee
      last edited by

      Ok so have the DamagedBB placed when your trigger sees all the BBs sunk. Might as well make it a A0 D0 M0 since it's not going anywhere. Then your -10 PU trigger fires when he sees it's there. Then at the start of JPNs turn have a trigger remove it. That way if JPN attacks again it won't be there to soak a hit.

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

        @beelee

        that was excatly my first programming, but this way of doing it restricts the game. I want the user to decide what he does.

        If he decides to move the damaged BB to a shore next to factory it should be repaired, if the player decides to attack with it, it should be possible too.

        I think the programmers should enlarge the "placement" function by the battleship_hit.

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

          @numetalfan yea that'd be cool. I'd make a Feature request as WC suggested then, because edit is the only way to do it for now.

          There's been a few more developers active lately. If it's easy, maybe someone will take it on sooner than later.

          Might request at git also https://github.com/triplea-game/triplea/issues then add Feature Request from the Label menu. Might get more visibility that way. I'd post it here too.

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

            @beelee

            thx

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

              @beelee

              Trigger question.

              First trigger condition....something like

              name='conditionAttachmentJapaneseBattleships' attachTo='Japanese' javaClass='RulesAttachment' type='player'>
              <option name='directPresenceTerritories' value='map' count='1'/>
              <option name='unitPresence' value='battleship' count='1'/>

              Second trigger condition

              name='conditionAttachmentJapaneseBattleships' attachTo='Japanese' javaClass='RulesAttachment' type='player'>
              <option name='directPresenceTerritories' value='map' count='1'/>
              <option name='unitPresence' value='battleship_hit' count='1'/>

              It does not work! There is an error

              So how make a condition that checks the presence of a regular battleship but that has already got a hit in a defined territory??

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

                @numetalfan do you have "when" set for your trigger ? If so , might need to play around with which phase.

                It does find the BB, just not the damaged one ?

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

                  @beelee

                  That was just an example. My trigger has a when...

                  Yeah. If there is a battleship in thst sea zone the trigger works. Is there a BB with a hit it doesn't. And ...battleship_hit.. causes an immediate error, the game will not start.

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

                    @numetalfan hmm...yea when the BB is hit it still calls it a BB when you hover on it so Idk ... you could try making the BB turn into a different unit when hit and then search for that.

                    Sort of what we were trying earlier with the "BattleshipDamaged"

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

                      Hi all,

                      I tried

                      <attachment name="conditionAttachmentPearlHarbour" attachTo="Americans_west" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                      <option name="directExclusionTerritories" value="53 Sea Zone" count="1"/>
                      <option name="rounds" value="1"/>
                      </attachment>

                      I thought this coding would check how the status of 53 sea zone is:
                      If Japan did not attack or the attack failed, this condition should be wrong, there would still be an unit (battleship) of the American_west there

                      If the Japanese are succesful, there are no more allied ships left, so the condition would be true.

                      yet, it doesn't work correctly. I wonder why

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

                        @numetalfan I would try using "unitPresence" and"directPresenceTerritories" instead . Something like

                        <option name="directPresenceTerritories" value="53 Sea Zone" count="1"/>

                        <option name="unitPresence" value="battleship" count="1"/>

                        1 Reply Last reply Reply Quote 0

                        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