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

    Trigger help

    Scheduled Pinned Locked Moved Map Making
    7 Posts 4 Posters 1.1k 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.
    • F Offline
      ff03k64
      last edited by ff03k64

      I am trying to emulate some triggers from the warcraft map, but it isn't working. I am making units create other units for a single turn, but they aren't disappearing like the should.

      Thanks for any help!

      Warcraft code that i used as a model

              <attachment name="conditionEveryTurn" attachTo="Nature" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                  <option name="rounds" value="1-+"/>
              </attachment>
      
      
              <attachment name="triggerAttachment_The_Judgment-Spell_is_packed_away" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                  <option name="conditions" value="conditionEveryTurn"/>
                  <option name="when" value="after:HumansBattle"/>
                  <option name="removeUnits" value="all:Judgment-Spell" count="1"/>
                  <option name="players" value="$AllPlayers$"/>
              </attachment>
      

      The code i think should work

      	<attachment name="conditionEveryTurn" attachTo="XCOM" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
      		<option name="rounds" value="1-+"/>
      	</attachment>
      
      
      	<attachment name="triggerAttachment_Unused_XCOM_grenades" attachTo="XCOM" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
      		<option name="conditions" value="conditionEveryTurn"/>
      		<option name="when" value="after:XCOMBattle"/>
      		<option name="removeUnits" value="all:grenade" count="10000"/>
      	</attachment>
      
      B 1 Reply Last reply Reply Quote 0
      • B Offline
        beelee @ff03k64
        last edited by

        @ff03k64 said in Trigger help:

        the only thing I see is you don't have "players"

        <option name="players" value="$AllPlayers$"/>

        Idk if u need it or not but u could try it

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

          @beelee

          If there are no players, then the trigger will take the 'attachTo' information. The only thing I can think of is 'count="10000"' being to high. Maybe try with a lower number like 99.

          Also check your properties for:

          <property name="Use Triggers" value="true" editable="true">
             <boolean/>
          </property>
          

          Cheers...

          1 Reply Last reply Reply Quote 1
          • F Offline
            ff03k64
            last edited by

            @beelee @wc_sumpton

            It was even easier than either of those two, it was capitalization 🤦

            Thanks for your help though!

            1 Reply Last reply Reply Quote 2
            • F Offline
              ff03k64
              last edited by

              Is there a good guide beyond the POS map for triggers?

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

                @ff03k64 @RogerCooper might have idk

                RogerCooperR 1 Reply Last reply Reply Quote 0
                • RogerCooperR Offline
                  RogerCooper @beelee
                  last edited by

                  @beelee I have found no better source than POS2.

                  1 Reply Last reply Reply Quote 1

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