Difference between revisions of "Response"

From Castle Wiki
m
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, 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.
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.
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]]
* Create a text box
* Create a [[Text|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 24: Line 24:
* Move this actor to the back
* Move this actor to the back


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


* Enable a behavior
* Enable a behavior
Line 32: Line 32:
=== 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 colliding actor to perform a response
*Tell the colliding actor to perform a response
Line 38: Line 38:
=== 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
*Stop repeating
Line 49: Line 49:
* 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


Line 62: Line 62:
* 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 70: Line 70:
* 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 21:36, 11 May 2022

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
  • 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

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