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

    (how to get a) Notification for Trigger with "chance" element

    Scheduled Pinned Locked Moved Map Making
    4 Posts 2 Posters 610 Views 2 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.
    • ebbeE Offline
      ebbe
      last edited by

      I might hold a record for asking questions here on the forum 🙂
      but do not despair, i am learning (slowly)

      How to get a Notification to all players, when a trigger is has the "Chance"

        <attachment name="triggerAttachment_Activate_Daimyo_Turn2-5+10-15" attachTo="Minor" javaClass="TriggerAttachment" type="player">
            <option name="conditions" value="conditionAttachmentActivate_Turn2-5+10-15"/><option name="chance" value="1:4"/>
            <option name="purchase" value="Daimyo_" count="1"/>
            <option name="notification" value="Minor_Daimyo"/>
            <!--<option name="players" value="$AllPlayers$"/>-->
            <option name="when" value="after:minorNonCombatMove"/>
          </attachment>
      

      So I cannot use the <option name="players" value="$AllPlayers$"/> as this would logically get all players the Daimyo placement,

      so: I should make a seperate trigger for the notification only I guess...
      BUT: how to connect this with the above trigger with the chance-element? ( hope you understand my point? )

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

        @ebbe

        Use a "switch" condition:

        <attachment name="conditionAttachmentt_Activate_Daimyo_Turn2-5+10-15" attachTo="Minor"" javaClass="RulesAttachment" type="player">
        	<option name="switch" value="false"/>
        </attachment>
        

        Then add the change to you present trigger:

        <attachment name="triggerAttachment_Activate_Daimyo_Turn2-5+10-15" attachTo="Minor" javaClass="TriggerAttachment" type="player">
        	<option name="conditions" value="conditionAttachmentActivate_Turn2-5+10-15"/>
        	<option name="chance" value="1:4"/>
        	<option name="purchase" value="Daimyo_" count="1"/>
        	<!-- <option name="notification" value="Minor_Daimyo"/>
        	<option name="players" value="$AllPlayers$"/> -->
        	<!-- Add switch change here -->
        	<option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachment_Activate_Daimyo_Turn2-5+10-15"/>
        	<option name="playerProperty" value="switch" count="true"/>	<!-- If successful change success switch to true -->
        	<option name="when" value="after:minorNonCombatMove"/>
        </attachment>
        

        Then the notification trigger:

        <attachment name="triggerAttachment_Minor_Daimyo_Notice" attachTo="Minor" javaClass="TriggerAttachment" type="player">
        	<option name="conditions" value="conditionAttachment_Activate_Daimyo_Turn2-5+10-15"/>
        	<option name="notification" value="Minor_Daimyo"/>
        	<option name="players" value="$All-Players$"/>
        	<!-- To use only once set uses -->
        	<!-- <option name="uses" value="1"/> only do this once OR -->
        	<!-- Reset switch back to false -->
        	<option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachment_Activate_Daimyo_Turn2-5+10-15"/>
        	<option name="playerProperty" value="switch" count="false"/>	<!-- Reset switch if you might need it again -->
        	<option name="when" value="before:minorPlace"/> <!-- or which phase starts after Non-Combat movement -->
        </attachment>
        

        Hope it helps!

        Cheers...

        ebbeE 1 Reply Last reply Reply Quote 2
        • ebbeE Offline
          ebbe @wc_sumpton
          last edited by ebbe

          @wc_sumpton : so again another case of using The Switch... hmmm... somehow the switch in my head fails to imply them well! muchas gracias again!

          wc_sumptonW 1 Reply Last reply Reply Quote 2
          • wc_sumptonW Offline
            wc_sumpton @ebbe
            last edited by

            @ebbe

            The Switch can be very powerful, Grasshopper!

            OR

            May The Switch be with you!

            Cheers...

            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