<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.castle.xyz/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Maricel+Ty</id>
	<title>Castle Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.castle.xyz/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Maricel+Ty"/>
	<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/Special:Contributions/Maricel_Ty"/>
	<updated>2026-04-16T04:59:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Response&amp;diff=613</id>
		<title>Response</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Response&amp;diff=613"/>
		<updated>2023-05-07T06:07:44Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;Response&amp;#039;&amp;#039;&amp;#039; is the part of a [[Rule]] that describes what to do when the rule is [[Trigger|triggered]]. One rule typically has many responses, which are run in order from top to bottom.&lt;br /&gt;
&lt;br /&gt;
Typically, responses describe actions that change the state of the [[Deck]]. Some common uses for responses include changing the motion of the player, creating or destroying actors, adding to the player&amp;#039;s score, or sending the player to another [[Card]] in the deck.&lt;br /&gt;
&lt;br /&gt;
== List of responses ==&lt;br /&gt;
Castle will only show responses that are available for the [[Behavior|Behaviors]] being used on the given [[Blueprint]]. For example, if the blueprint does not have [[Music]], then the &amp;quot;Play this actor&amp;#039;s song&amp;quot; response will not appear.&lt;br /&gt;
&lt;br /&gt;
Some responses are contextual to the rule. For example, the &amp;quot;Stop repeating&amp;quot; response is only available if already inside a [[Repeat]] response.&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
* Create a new [[Actor]] from [[Blueprint]], tell the created actor perform [[response]]&lt;br /&gt;
*Create a new [[Actor]] from [[Blueprint]], tell the created actor (none)&lt;br /&gt;
* Create a [[Text Box|Text box]]&lt;br /&gt;
* Destroy this actor&lt;br /&gt;
* Hide all text boxes&lt;br /&gt;
* Send player to a different [[Card]]&lt;br /&gt;
* Restart this card&lt;br /&gt;
* Add [[Tag|Tags]] to this actor&lt;br /&gt;
* Remove tags from this actor&lt;br /&gt;
&lt;br /&gt;
=== Order ===&lt;br /&gt;
&lt;br /&gt;
* Move this actor to the front&lt;br /&gt;
* Move this actor to the back&lt;br /&gt;
&lt;br /&gt;
=== [[Behavior]] ===&lt;br /&gt;
&lt;br /&gt;
* Enable a behavior&lt;br /&gt;
* Disable a behavior&lt;br /&gt;
* Modify a property&lt;br /&gt;
&lt;br /&gt;
=== Tell other actors ===&lt;br /&gt;
&lt;br /&gt;
* Tell actors with a [[Tag]] to perform a response&lt;br /&gt;
* Tell closest actor with a tag to perform a response&lt;br /&gt;
*Tell the [[Collision|Colliding]] actor to perform a response&lt;br /&gt;
&lt;br /&gt;
=== Logic ===&lt;br /&gt;
&lt;br /&gt;
* If a [[Condition]] is met, run a response&lt;br /&gt;
* [[Repeat]] N times&lt;br /&gt;
* Repeat every N seconds&lt;br /&gt;
*Stop repeating&lt;br /&gt;
* Wait before a response&lt;br /&gt;
&lt;br /&gt;
=== State ===&lt;br /&gt;
&lt;br /&gt;
* Modify the value of a [[Variable]]&lt;br /&gt;
* Reset a variable to its initial value&lt;br /&gt;
* Reset all variables to their initial values&lt;br /&gt;
* Save a variable to the [[Leaderboard]]&lt;br /&gt;
* Show the leaderboard for a variable&lt;br /&gt;
&lt;br /&gt;
=== Inventory ===&lt;br /&gt;
&lt;br /&gt;
* Offer a [[snapshot]] to the player&lt;br /&gt;
&lt;br /&gt;
=== [[Motion]] ===&lt;br /&gt;
&lt;br /&gt;
* Face direction of motion&lt;br /&gt;
* Move toward my own angle&lt;br /&gt;
* Move toward another actor&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
&lt;br /&gt;
* Play a sound&lt;br /&gt;
* Stop all sound&lt;br /&gt;
* Play this actor&amp;#039;s [[Music|song]]&lt;br /&gt;
* Stop this actor&amp;#039;s song&lt;br /&gt;
* Stop a track from this actor&amp;#039;s song&lt;br /&gt;
* Play a pattern from this actor&amp;#039;s song&lt;br /&gt;
* Play one step from a pattern in this actor&amp;#039;s song&lt;br /&gt;
* Mute a track from this actor&amp;#039;s song&lt;br /&gt;
* Unmute a track from this actor&amp;#039;s song&lt;br /&gt;
&lt;br /&gt;
=== [[Clock]] ===&lt;br /&gt;
&lt;br /&gt;
* Set the clock tempo&lt;br /&gt;
&lt;br /&gt;
=== [[Camera]] ===&lt;br /&gt;
&lt;br /&gt;
* Follow this with the camera&lt;br /&gt;
&lt;br /&gt;
=== Meta ===&lt;br /&gt;
&lt;br /&gt;
* Add a note to this rule&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Shoot_%27Em_Up_Kit&amp;diff=512</id>
		<title>Shoot &#039;Em Up Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Shoot_%27Em_Up_Kit&amp;diff=512"/>
		<updated>2022-07-31T10:05:14Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: Created page with &amp;quot;Sorry. This Is Under Progress&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sorry. This Is Under Progress&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Rhythm_Kit&amp;diff=511</id>
		<title>Rhythm Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Rhythm_Kit&amp;diff=511"/>
		<updated>2022-07-31T10:04:31Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: Created page with &amp;quot;Sorry. This Is Under Progress&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sorry. This Is Under Progress&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Pinball_Kit&amp;diff=510</id>
		<title>Pinball Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Pinball_Kit&amp;diff=510"/>
		<updated>2022-07-31T10:03:33Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: Created page with &amp;quot;Sorry. This Is Under Progress&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sorry. This Is Under Progress&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Tower_Defense_Kit&amp;diff=509</id>
		<title>Tower Defense Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Tower_Defense_Kit&amp;diff=509"/>
		<updated>2022-07-31T10:01:44Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back:&lt;br /&gt;
[[Rhythm Kit]] [[Action Platformer Kit]]&lt;br /&gt;
[[Platformer Kit]] [[Golf Course Kit]]&lt;br /&gt;
[[Topdown Golf Course Kit]] [[Adventure Kit]]&lt;br /&gt;
[[Lab Escape Kit]] [[Shoot &amp;#039;Em Up Kit]]&lt;br /&gt;
[[Pinball Kit]] [[Meadowland Kit]]&lt;br /&gt;
[[Race Track Kit]] [[Flappy Kit]]&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Tower_Defense_Kit&amp;diff=508</id>
		<title>Tower Defense Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Tower_Defense_Kit&amp;diff=508"/>
		<updated>2022-07-31T09:55:41Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Tower_Defense_Kit&amp;diff=507</id>
		<title>Tower Defense Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Tower_Defense_Kit&amp;diff=507"/>
		<updated>2022-07-31T09:54:56Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: Created page with &amp;quot;Entrance Will Do These Rules: Tell Actors With Tag #path to peform                 Add tag #unconnected      Your Turn To Edit!&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Entrance Will Do These Rules: Tell Actors With Tag #path to peform               &lt;br /&gt;
&lt;br /&gt;
Add tag #unconnected&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your Turn To Edit!&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=506</id>
		<title>Rule</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=506"/>
		<updated>2022-07-31T09:52:08Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: Edited Rules&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Rule is a unit of logic in Castle decks. Rules can be added to [[blueprint|blueprints]] in order to change the behavior of the blueprint in response to specific events or under certain conditions.&lt;br /&gt;
[[File:Golf-ball-rules.jpg|alt=A screenshot of a blueprint in the Castle editor showing several Rules|thumb|An example of a blueprint containing several rules.]]&lt;br /&gt;
Each rule consists of a [[Trigger]] and one or more [[response|Responses]]. A trigger is the part of a Rule that describes when to run that rule, such as &amp;#039;&amp;#039;&amp;#039;When this is tapped&amp;#039;&amp;#039;&amp;#039;. Responses are the part of the rule that describe what to do after the rule is triggered, such as &amp;#039;&amp;#039;&amp;#039;Destroy this actor&amp;#039;&amp;#039;&amp;#039;. A blueprint can have many rules, but it doesn&amp;#039;t have to have any.&lt;br /&gt;
&lt;br /&gt;
There are many different possible triggers and even more responses. Simple rules can be used by anybody to add basic logic to a game or a piece of art, like playing a sound effect when the player taps an item, or restarting the card when the player [[Collision|collides]] with an enemy. When rules start to get more complex, they can do almost anything. Advanced users have used them to make procedural art, simulations, and even basic 3d games. Rules are one of the most powerful core elements of Castle.&lt;br /&gt;
&lt;br /&gt;
== Adding and editing rules ==&lt;br /&gt;
To add rules to blueprints, first open the [[Inspector]] for the blueprint you&amp;#039;d like to edit, then go to the [[Logic]] tab.&lt;br /&gt;
&lt;br /&gt;
== Learning how to write rules ==&lt;br /&gt;
The best way to learn Rules is to follow a guide, such as [[Guides:How to make your first Castle deck|How to make your first Castle deck]], which walks you through making your first Rules. Secondly, consider starting with one of the premade Castle [[Kits]], and then inspect the blueprints that come with it. Lastly, you can also [[View Source|View the Source]] of any deck to see how it was made.&lt;br /&gt;
&lt;br /&gt;
== Examples of rules ==&lt;br /&gt;
As an illustrative example, imagine a golf game. You want to be able to sling the golf ball when it&amp;#039;s sitting on the ground, but after it&amp;#039;s flying through the air, the player shouldn&amp;#039;t be able to sling it anymore. The golf ball might have a rule like this:&lt;br /&gt;
 When this is slung: Disable behavior slingshot&lt;br /&gt;
Eventually, after the ball reaches the ground and comes to a stop, we want to allow the player to sling again:&lt;br /&gt;
 When this stops moving: Enable behavior slingshot&lt;br /&gt;
If the player accidentally slings the ball out of the screen, we count that as losing the game, so we want to start the level over. The golf ball might have a third rule like this one:&lt;br /&gt;
 When this exits the camera viewport: Crate text box &amp;quot;The ball fell out of the card&amp;quot; when tapped peform response: Restart this card&lt;br /&gt;
But if the player succeeds in putting the golf ball in the hole, we want to show a message saying they won:&lt;br /&gt;
 When this collides with tag #hole: If variable: hits is greater than 1 Create text box &amp;quot;You got the ball into the hole! Hits: $hits else Create text box &amp;quot;HOLE IN ONE!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can find a (slightly more complex) version of these exact rules if you check out the [[Golf Course Kit]]. More Decks: [[Topdown Golf Course Kit]] (under progress),&lt;br /&gt;
[[Lab Escape Kit]],&lt;br /&gt;
[[Tower Defense Kit]]&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Topdown_Golf_Course_Kit&amp;diff=505</id>
		<title>Topdown Golf Course Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Topdown_Golf_Course_Kit&amp;diff=505"/>
		<updated>2022-07-31T03:31:51Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: Created page with &amp;quot;Under Progress.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Under Progress.&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=504</id>
		<title>Rule</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=504"/>
		<updated>2022-07-31T03:30:53Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Rule is a unit of logic in Castle decks. Rules can be added to [[blueprint|blueprints]] in order to change the behavior of the blueprint in response to specific events or under certain conditions.&lt;br /&gt;
[[File:Golf-ball-rules.jpg|alt=A screenshot of a blueprint in the Castle editor showing several Rules|thumb|An example of a blueprint containing several rules.]]&lt;br /&gt;
Each rule consists of a [[Trigger]] and one or more [[response|Responses]]. A trigger is the part of a Rule that describes when to run that rule, such as &amp;#039;&amp;#039;&amp;#039;When this is tapped&amp;#039;&amp;#039;&amp;#039;. Responses are the part of the rule that describe what to do after the rule is triggered, such as &amp;#039;&amp;#039;&amp;#039;Destroy this actor&amp;#039;&amp;#039;&amp;#039;. A blueprint can have many rules, but it doesn&amp;#039;t have to have any.&lt;br /&gt;
&lt;br /&gt;
There are many different possible triggers and even more responses. Simple rules can be used by anybody to add basic logic to a game or a piece of art, like playing a sound effect when the player taps an item, or restarting the card when the player [[Collision|collides]] with an enemy. When rules start to get more complex, they can do almost anything. Advanced users have used them to make procedural art, simulations, and even basic 3d games. Rules are one of the most powerful core elements of Castle.&lt;br /&gt;
&lt;br /&gt;
== Adding and editing rules ==&lt;br /&gt;
To add rules to blueprints, first open the [[Inspector]] for the blueprint you&amp;#039;d like to edit, then go to the [[Logic]] tab.&lt;br /&gt;
&lt;br /&gt;
== Learning how to write rules ==&lt;br /&gt;
The best way to learn Rules is to follow a guide, such as [[Guides:How to make your first Castle deck|How to make your first Castle deck]], which walks you through making your first Rules. Secondly, consider starting with one of the premade Castle [[Kits]], and then inspect the blueprints that come with it. Lastly, you can also [[View Source|View the Source]] of any deck to see how it was made.&lt;br /&gt;
&lt;br /&gt;
== Examples of rules ==&lt;br /&gt;
As an illustrative example, imagine a golf game. You want to be able to sling the golf ball when it&amp;#039;s sitting on the ground, but after it&amp;#039;s flying through the air, the player shouldn&amp;#039;t be able to sling it anymore. The golf ball might have a rule like this:&lt;br /&gt;
 When this is slung: Disable behavior slingshot&lt;br /&gt;
Eventually, after the ball reaches the ground and comes to a stop, we want to allow the player to sling again:&lt;br /&gt;
 When this stops moving: Enable behavior slingshot&lt;br /&gt;
If the player accidentally slings the ball out of the screen, we count that as losing the game, so we want to start the level over. The golf ball might have a third rule like this one:&lt;br /&gt;
 When this exits the camera viewport: Crate text box &amp;quot;The ball fell out of the card&amp;quot; when tapped peform response: Restart this card&lt;br /&gt;
But if the player succeeds in putting the golf ball in the hole, we want to show a message saying they won:&lt;br /&gt;
 When this collides with tag #hole: If variable: hits is greater than 1 Create text box &amp;quot;You got the ball into the hole! Hits: $hits else Create text box &amp;quot;HOLE IN ONE!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can find a (slightly more complex) version of these exact rules if you check out the [[Golf Course Kit]]. More Decks: [[Topdown Golf Course Kit]] (under progress).&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=503</id>
		<title>Rule</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=503"/>
		<updated>2022-07-31T03:29:55Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: Added A New Link To Decks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Rule is a unit of logic in Castle decks. Rules can be added to [[blueprint|blueprints]] in order to change the behavior of the blueprint in response to specific events or under certain conditions.&lt;br /&gt;
[[File:Golf-ball-rules.jpg|alt=A screenshot of a blueprint in the Castle editor showing several Rules|thumb|An example of a blueprint containing several rules.]]&lt;br /&gt;
Each rule consists of a [[Trigger]] and one or more [[response|Responses]]. A trigger is the part of a Rule that describes when to run that rule, such as &amp;#039;&amp;#039;&amp;#039;When this is tapped&amp;#039;&amp;#039;&amp;#039;. Responses are the part of the rule that describe what to do after the rule is triggered, such as &amp;#039;&amp;#039;&amp;#039;Destroy this actor&amp;#039;&amp;#039;&amp;#039;. A blueprint can have many rules, but it doesn&amp;#039;t have to have any.&lt;br /&gt;
&lt;br /&gt;
There are many different possible triggers and even more responses. Simple rules can be used by anybody to add basic logic to a game or a piece of art, like playing a sound effect when the player taps an item, or restarting the card when the player [[Collision|collides]] with an enemy. When rules start to get more complex, they can do almost anything. Advanced users have used them to make procedural art, simulations, and even basic 3d games. Rules are one of the most powerful core elements of Castle.&lt;br /&gt;
&lt;br /&gt;
== Adding and editing rules ==&lt;br /&gt;
To add rules to blueprints, first open the [[Inspector]] for the blueprint you&amp;#039;d like to edit, then go to the [[Logic]] tab.&lt;br /&gt;
&lt;br /&gt;
== Learning how to write rules ==&lt;br /&gt;
The best way to learn Rules is to follow a guide, such as [[Guides:How to make your first Castle deck|How to make your first Castle deck]], which walks you through making your first Rules. Secondly, consider starting with one of the premade Castle [[Kits]], and then inspect the blueprints that come with it. Lastly, you can also [[View Source|View the Source]] of any deck to see how it was made.&lt;br /&gt;
&lt;br /&gt;
== Examples of rules ==&lt;br /&gt;
As an illustrative example, imagine a golf game. You want to be able to sling the golf ball when it&amp;#039;s sitting on the ground, but after it&amp;#039;s flying through the air, the player shouldn&amp;#039;t be able to sling it anymore. The golf ball might have a rule like this:&lt;br /&gt;
 When this is slung: Disable behavior slingshot&lt;br /&gt;
Eventually, after the ball reaches the ground and comes to a stop, we want to allow the player to sling again:&lt;br /&gt;
 When this stops moving: Enable behavior slingshot&lt;br /&gt;
If the player accidentally slings the ball out of the screen, we count that as losing the game, so we want to start the level over. The golf ball might have a third rule like this one:&lt;br /&gt;
 When this exits the camera viewport: Crate text box &amp;quot;The ball fell out of the card&amp;quot; when tapped peform response: Restart this card&lt;br /&gt;
But if the player succeeds in putting the golf ball in the hole, we want to show a message saying they won:&lt;br /&gt;
 When this collides with tag #hole: If variable: hits is greater than 1 Create text box &amp;quot;You got the ball into the hole! Hits: $hits else Create text box &amp;quot;HOLE IN ONE!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can find a (slightly more complex) version of these exact rules if you check out the [[Golf Course Kit]]. More Decks: [[Topdown Golf Course Kit]].&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=502</id>
		<title>Rule</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=502"/>
		<updated>2022-07-31T03:27:39Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Rule is a unit of logic in Castle decks. Rules can be added to [[blueprint|blueprints]] in order to change the behavior of the blueprint in response to specific events or under certain conditions.&lt;br /&gt;
[[File:Golf-ball-rules.jpg|alt=A screenshot of a blueprint in the Castle editor showing several Rules|thumb|An example of a blueprint containing several rules.]]&lt;br /&gt;
Each rule consists of a [[Trigger]] and one or more [[response|Responses]]. A trigger is the part of a Rule that describes when to run that rule, such as &amp;#039;&amp;#039;&amp;#039;When this is tapped&amp;#039;&amp;#039;&amp;#039;. Responses are the part of the rule that describe what to do after the rule is triggered, such as &amp;#039;&amp;#039;&amp;#039;Destroy this actor&amp;#039;&amp;#039;&amp;#039;. A blueprint can have many rules, but it doesn&amp;#039;t have to have any.&lt;br /&gt;
&lt;br /&gt;
There are many different possible triggers and even more responses. Simple rules can be used by anybody to add basic logic to a game or a piece of art, like playing a sound effect when the player taps an item, or restarting the card when the player [[Collision|collides]] with an enemy. When rules start to get more complex, they can do almost anything. Advanced users have used them to make procedural art, simulations, and even basic 3d games. Rules are one of the most powerful core elements of Castle.&lt;br /&gt;
&lt;br /&gt;
== Adding and editing rules ==&lt;br /&gt;
To add rules to blueprints, first open the [[Inspector]] for the blueprint you&amp;#039;d like to edit, then go to the [[Logic]] tab.&lt;br /&gt;
&lt;br /&gt;
== Learning how to write rules ==&lt;br /&gt;
The best way to learn Rules is to follow a guide, such as [[Guides:How to make your first Castle deck|How to make your first Castle deck]], which walks you through making your first Rules. Secondly, consider starting with one of the premade Castle [[Kits]], and then inspect the blueprints that come with it. Lastly, you can also [[View Source|View the Source]] of any deck to see how it was made.&lt;br /&gt;
&lt;br /&gt;
== Examples of rules ==&lt;br /&gt;
As an illustrative example, imagine a golf game. You want to be able to sling the golf ball when it&amp;#039;s sitting on the ground, but after it&amp;#039;s flying through the air, the player shouldn&amp;#039;t be able to sling it anymore. The golf ball might have a rule like this:&lt;br /&gt;
 When this is slung: Disable behavior slingshot&lt;br /&gt;
Eventually, after the ball reaches the ground and comes to a stop, we want to allow the player to sling again:&lt;br /&gt;
 When this stops moving: Enable behavior slingshot&lt;br /&gt;
If the player accidentally slings the ball out of the screen, we count that as losing the game, so we want to start the level over. The golf ball might have a third rule like this one:&lt;br /&gt;
 When this exits the camera viewport: Crate text box &amp;quot;The ball fell out of the card&amp;quot; when tapped peform response: Restart this card&lt;br /&gt;
But if the player succeeds in putting the golf ball in the hole, we want to show a message saying they won:&lt;br /&gt;
 When this collides with tag #hole: If variable: hits is greater than 1 Create text box &amp;quot;You got the ball into the hole! Hits: $hits else Create text box &amp;quot;HOLE IN ONE!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can find a (slightly more complex) version of these exact rules if you check out the [[Golf Course Kit]].&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=501</id>
		<title>Rule</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=501"/>
		<updated>2022-07-31T03:18:26Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Rule is a unit of logic in Castle decks. Rules can be added to [[blueprint|blueprints]] in order to change the behavior of the blueprint in response to specific events or under certain conditions.&lt;br /&gt;
[[File:Golf-ball-rules.jpg|alt=A screenshot of a blueprint in the Castle editor showing several Rules|thumb|An example of a blueprint containing several rules.]]&lt;br /&gt;
Each rule consists of a [[Trigger]] and one or more [[response|Responses]]. A trigger is the part of a Rule that describes when to run that rule, such as &amp;#039;&amp;#039;&amp;#039;When this is tapped&amp;#039;&amp;#039;&amp;#039;. Responses are the part of the rule that describe what to do after the rule is triggered, such as &amp;#039;&amp;#039;&amp;#039;Destroy this actor&amp;#039;&amp;#039;&amp;#039;. A blueprint can have many rules, but it doesn&amp;#039;t have to have any.&lt;br /&gt;
&lt;br /&gt;
There are many different possible triggers and even more responses. Simple rules can be used by anybody to add basic logic to a game or a piece of art, like playing a sound effect when the player taps an item, or restarting the card when the player [[Collision|collides]] with an enemy. When rules start to get more complex, they can do almost anything. Advanced users have used them to make procedural art, simulations, and even basic 3d games. Rules are one of the most powerful core elements of Castle.&lt;br /&gt;
&lt;br /&gt;
== Adding and editing rules ==&lt;br /&gt;
To add rules to blueprints, first open the [[Inspector]] for the blueprint you&amp;#039;d like to edit, then go to the [[Logic]] tab.&lt;br /&gt;
&lt;br /&gt;
== Learning how to write rules ==&lt;br /&gt;
The best way to learn Rules is to follow a guide, such as [[Guides:How to make your first Castle deck|How to make your first Castle deck]], which walks you through making your first Rules. Secondly, consider starting with one of the premade Castle [[Kits]], and then inspect the blueprints that come with it. Lastly, you can also [[View Source|View the Source]] of any deck to see how it was made.&lt;br /&gt;
&lt;br /&gt;
== Examples of rules ==&lt;br /&gt;
As an illustrative example, imagine a golf game. You want to be able to sling the golf ball when it&amp;#039;s sitting on the ground, but after it&amp;#039;s flying through the air, the player shouldn&amp;#039;t be able to sling it anymore. The golf ball might have a rule like this:&lt;br /&gt;
 When this is slung: Disable behavior slingshot&lt;br /&gt;
Eventually, after the ball reaches the ground and comes to a stop, we want to allow the player to sling again:&lt;br /&gt;
 When this stops moving: Enable behavior slingshot&lt;br /&gt;
If the player accidentally slings the ball out of the screen, we count that as losing the game, so we want to start the level over. The golf ball might have a third rule like this one:&lt;br /&gt;
 When this exits the camera viewport: Crate text box &amp;quot;The ball fell out of the card&amp;quot; when tapped peform response: Restart this card&lt;br /&gt;
But if the player succeeds in putting the golf ball in the hole, we want to show a message saying they won:&lt;br /&gt;
 When this collides with tag #hole: If variable: hits is greater than 1 Create text box &amp;quot;You got the ball into the hole! Hits: $hits else&lt;br /&gt;
You can find a (slightly more complex) version of these exact rules if you check out the [[Golf Course Kit]].&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
	<entry>
		<id>https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=500</id>
		<title>Rule</title>
		<link rel="alternate" type="text/html" href="https://wiki.castle.xyz/wiki/index.php?title=Rule&amp;diff=500"/>
		<updated>2022-07-30T14:07:27Z</updated>

		<summary type="html">&lt;p&gt;Maricel Ty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Rule is a unit of logic in Castle decks. Rules can be added to [[blueprint|blueprints]] in order to change the behavior of the blueprint in response to specific events or under certain conditions.&lt;br /&gt;
[[File:Golf-ball-rules.jpg|alt=A screenshot of a blueprint in the Castle editor showing several Rules|thumb|An example of a blueprint containing several rules.]]&lt;br /&gt;
Each rule consists of a [[Trigger]] and one or more [[response|Responses]]. A trigger is the part of a Rule that describes when to run that rule, such as &amp;#039;&amp;#039;&amp;#039;When this is tapped&amp;#039;&amp;#039;&amp;#039;. Responses are the part of the rule that describe what to do after the rule is triggered, such as &amp;#039;&amp;#039;&amp;#039;Destroy this actor&amp;#039;&amp;#039;&amp;#039;. A blueprint can have many rules, but it doesn&amp;#039;t have to have any.&lt;br /&gt;
&lt;br /&gt;
There are many different possible triggers and even more responses. Simple rules can be used by anybody to add basic logic to a game or a piece of art, like playing a sound effect when the player taps an item, or restarting the card when the player [[Collision|collides]] with an enemy. When rules start to get more complex, they can do almost anything. Advanced users have used them to make procedural art, simulations, and even basic 3d games. Rules are one of the most powerful core elements of Castle.&lt;br /&gt;
&lt;br /&gt;
== Adding and editing rules ==&lt;br /&gt;
To add rules to blueprints, first open the [[Inspector]] for the blueprint you&amp;#039;d like to edit, then go to the [[Logic]] tab.&lt;br /&gt;
&lt;br /&gt;
== Learning how to write rules ==&lt;br /&gt;
The best way to learn Rules is to follow a guide, such as [[Guides:How to make your first Castle deck|How to make your first Castle deck]], which walks you through making your first Rules. Secondly, consider starting with one of the premade Castle [[Kits]], and then inspect the blueprints that come with it. Lastly, you can also [[View Source|View the Source]] of any deck to see how it was made.&lt;br /&gt;
&lt;br /&gt;
== Examples of rules ==&lt;br /&gt;
As an illustrative example, imagine a golf game. You want to be able to sling the golf ball when it&amp;#039;s sitting on the ground, but after it&amp;#039;s flying through the air, the player shouldn&amp;#039;t be able to sling it anymore. The golf ball might have a rule like this:&lt;br /&gt;
 When this is slung: Disable behavior slingshot&lt;br /&gt;
Eventually, after the ball reaches the ground and comes to a stop, we want to allow the player to sling again:&lt;br /&gt;
 When this stops moving: Enable behavior slingshot&lt;br /&gt;
If the player accidentally slings the ball out of the screen, we count that as losing the game, so we want to start the level over. The golf ball might have a third rule like this one:&lt;br /&gt;
 When this exits the camera viewport: Restart this card&lt;br /&gt;
But if the player succeeds in putting the golf ball in the hole, we want to show a message saying they won:&lt;br /&gt;
 When this collides with tag #hole: Create text box &amp;quot;You got the ball into the hole! Hits: $hits&lt;br /&gt;
You can find a (slightly more complex) version of these exact rules if you check out the [[Golf Course Kit]].&lt;/div&gt;</summary>
		<author><name>Maricel Ty</name></author>
	</entry>
</feed>