Navigation

    TripleA Logo

    TripleA Forum

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

    Trigger help

    Map Making
    4
    7
    486
    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
      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
        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

        W 1 Reply Last reply Reply Quote 0
        • W
          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
            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
              ff03k64 last edited by

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

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

                @ff03k64 @RogerCooper might have idk

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

                  @beelee I have found no better source than POS2.

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