<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Having issue making a one time use UserActionAttachment with switch condition]]></title><description><![CDATA[<p dir="auto">Im having an issue making a one time use UserAttachment with a switch condition.</p>
<pre><code>&lt;attachment name="conditionAttachmentWillItWorkCondition" attachTo="Player" javaClass="RulesAttachment" type="player"&gt;
&lt;option name="switch" value="true"/&gt;
&lt;/attachment&gt;

&lt;attachment name="triggerAttachmentWillItWorkTrigger" attachTo="Player" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"&gt;
&lt;option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentWillItWorkCondition"/&gt;
&lt;option name="playerProperty" value="switch" count="false"/&gt;
&lt;/attachment&gt;

&lt;attachment name="userActionAttachmentWillItWorkUser" attachTo="Player" javaClass="UserActionAttachment" type="player"&gt;
&lt;option name="conditions" value="conditionAttachmentWillItWorkCondition"/&gt;
&lt;option name="activateTrigger" value="triggerAttachmentWillItWorkTrigger:1:false:false:false:false"/&gt;
&lt;option name="text" value="WillItWork"/&gt;
&lt;option name="chance" value="1:1"/&gt;
&lt;option name="costResources" value="PUs" count="0"/&gt;
&lt;/attachment&gt;
</code></pre>
<p dir="auto">The UserActionAttachment shows up during the players turn, (since the switch condition for the player is true) but after activating, it still shows up on subsequent turns even though the trigger should set the switch condition to false and therefore make it not show up. Im rather lost on how to make it work.</p>
]]></description><link>https://forums.triplea-game.org/topic/3620/having-issue-making-a-one-time-use-useractionattachment-with-switch-condition</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 22:38:03 GMT</lastBuildDate><atom:link href="https://forums.triplea-game.org/topic/3620.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 29 Jul 2023 05:32:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Having issue making a one time use UserActionAttachment with switch condition on Tue, 01 Aug 2023 19:41:00 GMT]]></title><description><![CDATA[<p dir="auto">Seems it wasnt working because I had the playerattachment for the player underneath all the triggers. Ty for confirming it works, it made me think of trying that.</p>
]]></description><link>https://forums.triplea-game.org/post/59285</link><guid isPermaLink="true">https://forums.triplea-game.org/post/59285</guid><dc:creator><![CDATA[Zaroph]]></dc:creator><pubDate>Tue, 01 Aug 2023 19:41:00 GMT</pubDate></item><item><title><![CDATA[Reply to Having issue making a one time use UserActionAttachment with switch condition on Sun, 30 Jul 2023 02:38:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zaroph" aria-label="Profile: zaroph">@<bdi>zaroph</bdi></a></p>
<p dir="auto">Your code seems to work, as long as "Player" accepts the user action, and not "No Actions" it was skipped.</p>
<p dir="auto">Cheers...</p>
]]></description><link>https://forums.triplea-game.org/post/59258</link><guid isPermaLink="true">https://forums.triplea-game.org/post/59258</guid><dc:creator><![CDATA[wc_sumpton]]></dc:creator><pubDate>Sun, 30 Jul 2023 02:38:16 GMT</pubDate></item></channel></rss>