<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.castle.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Condition</id>
	<title>Condition - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.castle.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Condition"/>
	<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Condition&amp;action=history"/>
	<updated>2026-04-16T02:04:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Condition&amp;diff=316&amp;oldid=prev</id>
		<title>Ben at 16:08, 13 May 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Condition&amp;diff=316&amp;oldid=prev"/>
		<updated>2022-05-13T16:08:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:08, 13 May 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    Else:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    Else:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Create text box &amp;quot;You need the axe to get the gold&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Create text box &amp;quot;You need the axe to get the gold&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;For more information on how to add conditions and responses, see [[Rule|Rules]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== List of conditions ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== List of conditions ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-314:rev-316 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ben</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Condition&amp;diff=314&amp;oldid=prev</id>
		<title>Ben: Created page with &quot;A &#039;&#039;&#039;Condition&#039;&#039;&#039; is a type of Response which only runs its enclosed logic when a certain condition is true.  For example, imagine an adventure game where the player needs...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Condition&amp;diff=314&amp;oldid=prev"/>
		<updated>2022-05-13T15:54:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;A &amp;#039;&amp;#039;&amp;#039;Condition&amp;#039;&amp;#039;&amp;#039; is a type of &lt;a href=&quot;/Response&quot; title=&quot;Response&quot;&gt;Response&lt;/a&gt; which only runs its enclosed logic when a certain condition is true.  For example, imagine an adventure game where the player needs...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;Condition&amp;#039;&amp;#039;&amp;#039; is a type of [[Response]] which only runs its enclosed logic when a certain condition is true.&lt;br /&gt;
&lt;br /&gt;
For example, imagine an adventure game where the player needs to use a pick to mine gold. When the player touches a piece of gold, you need to check if they have the pick to decide what to do. You might write a rule like this:&lt;br /&gt;
&lt;br /&gt;
 When this collides with tag #gold:&lt;br /&gt;
   If variable $has_axe equals 1:&lt;br /&gt;
     Tell the colliding actor: Destroy this actor&lt;br /&gt;
     Set variable $num_gold to 1 (Relative)&lt;br /&gt;
   Else:&lt;br /&gt;
     Create text box &amp;quot;You need the axe to get the gold&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== List of conditions ==&lt;br /&gt;
=== State ===&lt;br /&gt;
&lt;br /&gt;
* If an [[Expression]] meets a condition&lt;br /&gt;
* If a [[Variable]] meets a condition&lt;br /&gt;
* If this has a [[Tag]]&lt;br /&gt;
&lt;br /&gt;
=== [[Collision]] ===&lt;br /&gt;
&lt;br /&gt;
* If this is colliding&lt;br /&gt;
&lt;br /&gt;
=== Random ===&lt;br /&gt;
&lt;br /&gt;
* If a coin flip shows heads&lt;br /&gt;
&lt;br /&gt;
=== [[Camera]] ===&lt;br /&gt;
&lt;br /&gt;
* If this is in the camera viewport&lt;br /&gt;
&lt;br /&gt;
=== Draw ===&lt;br /&gt;
&lt;br /&gt;
* If the animation frame meets a condition&lt;/div&gt;</summary>
		<author><name>Ben</name></author>
	</entry>
</feed>