Difference between revisions of "Response"

From Castle Wiki
(Created page with "A '''Response''' is the part of a Rule that describes what to do when the rule is triggered. One rule typically has many responses, which are run in order from...")
 
Tag: Reverted
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A '''Response''' 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.
A '''Response''' 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.


Typically, respones 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's score, or sending the player to another card in the deck.
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's score, or sending the player to another [[Card]] in the deck.


== List of responses ==
== List of responses ==
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 "Play this actor's song" response will not appear.
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 "Play this actor's song" response will not appear.
 
Some responses are contextual to the rule. For example, the "Stop repeating" response is only available if already inside a [[Repeat]] response.


=== General ===
=== General ===


* Create a new actor from blueprint
* Create a new [[Actor]] from [[Blueprint]], tell the created actor perform [[response]]
* Create a text box
*Create a new [[Actor]] from [[Blueprint]], tell the created actor (none)
* Create a [[Text Box|Text box]]
* Destroy this actor
* Destroy this actor
* Hide all text boxes
* Hide all text boxes
* Send player to a different card
* Send player to a different [[Card]]
* Restart this card
* Restart this card
* Add tags to this actor
* Add [[Tag|Tags]] to this actor
* Remove tags from this actor
* Remove tags from this actor


Line 22: Line 25:
* Move this actor to the back
* Move this actor to the back


=== Behavior ===
=== [[Behavior]] ===


* Enable a behavior
* Enable a behavior
Line 30: Line 33:
=== Tell other actors ===
=== Tell other actors ===


* Tell actors with a tag to perform a response
* Tell actors with a [[Tag]] to perform a response
* Tell closest actor with a tag to perform a response
* Tell closest actor with a tag to perform a response
*Tell the [[Collision|Colliding]] actor to perform a response


=== Logic ===
=== Logic ===


* If a condition is met, run a response
* If a [[Condition]] is met, run a response
* Repeat N times
* [[Repeat]] N times
* Repeat every N seconds
* Repeat every N seconds
*Stop repeating
* Wait before a response
* Wait before a response


=== State ===
=== State ===


* Modify the value of a variable
* Modify the value of a [[Variable]]
* Reset a variable to its initial value
* Reset a variable to its initial value
* Reset all variables to their initial values
* Reset all variables to their initial values
* Save a variable to the leaderboard
* Save a variable to the [[Leaderboard]]
* Show the leaderboard for a variable
* Show the leaderboard for a variable


=== Motion ===
=== Inventory ===
 
* Offer a [[snapshot]] to the player
 
=== [[Motion]] ===


* Face direction of motion
* Face direction of motion
Line 58: Line 67:
* Play a sound
* Play a sound
* Stop all sound
* Stop all sound
* Play this actor's song
* Play this actor's [[Music|song]]
* Stop this actor's song
* Stop this actor's song
* Stop a track from this actor's song
* Stop a track from this actor's song
Line 66: Line 75:
* Unmute a track from this actor's song
* Unmute a track from this actor's song


=== Clock ===
=== [[Clock]] ===


* Set the clock tempo
* Set the clock tempo


=== Camera ===
=== [[Camera]] ===


* Follow this with the camera
* Follow this with the camera

Revision as of 06:07, 7 May 2023

A Response is the part of a Rule that describes what to do when the rule is triggered. One rule typically has many responses, which are run in order from top to bottom.

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's score, or sending the player to another Card in the deck.

List of responses

Castle will only show responses that are available for the Behaviors being used on the given Blueprint. For example, if the blueprint does not have Music, then the "Play this actor's song" response will not appear.

Some responses are contextual to the rule. For example, the "Stop repeating" response is only available if already inside a Repeat response.

General

  • Create a new Actor from Blueprint, tell the created actor perform response
  • Create a new Actor from Blueprint, tell the created actor (none)
  • Create a Text box
  • Destroy this actor
  • Hide all text boxes
  • Send player to a different Card
  • Restart this card
  • Add Tags to this actor
  • Remove tags from this actor

Order

  • Move this actor to the front
  • Move this actor to the back

Behavior

  • Enable a behavior
  • Disable a behavior
  • Modify a property

Tell other actors

  • Tell actors with a Tag to perform a response
  • Tell closest actor with a tag to perform a response
  • Tell the Colliding actor to perform a response

Logic

  • If a Condition is met, run a response
  • Repeat N times
  • Repeat every N seconds
  • Stop repeating
  • Wait before a response

State

  • Modify the value of a Variable
  • Reset a variable to its initial value
  • Reset all variables to their initial values
  • Save a variable to the Leaderboard
  • Show the leaderboard for a variable

Inventory

Motion

  • Face direction of motion
  • Move toward my own angle
  • Move toward another actor

Sound

  • Play a sound
  • Stop all sound
  • Play this actor's song
  • Stop this actor's song
  • Stop a track from this actor's song
  • Play a pattern from this actor's song
  • Play one step from a pattern in this actor's song
  • Mute a track from this actor's song
  • Unmute a track from this actor's song

Clock

  • Set the clock tempo

Camera

  • Follow this with the camera

Meta

  • Add a note to this rule