Difference between revisions of "Trigger"

From Castle Wiki
(add snapshot trigger)
 
Line 30: Line 30:
* When this gains a [[Tag]]
* When this gains a [[Tag]]
* When this loses a tag
* When this loses a tag
=== Inventory ===
* When a [[snapshot]] is taken


=== [[Motion]] ===
=== [[Motion]] ===

Latest revision as of 12:50, 19 October 2022

A Trigger is the part of a Rule that describes when to run that rule. All rules have exactly one trigger.

Typically, triggers describe events that might happen while a Card is playing. For example, to destroy a block when the player taps the block, use the When this is tapped trigger, followed by the Destroy this actor Response.

List of triggers

Castle will only show triggers that are available for the Behaviors being used on the given Blueprint. For example, if the blueprint does not use the Analog Stick, then the "When the analog stick input ends" trigger will not appear.

General

  • When this Collides with another Actor
  • When this is created
  • When this is destroyed

Controls

  • When this is tapped
  • While this is pressed
  • When a touch begins on this
  • When a touch ends on this
  • When analog stick input begins
  • When analog stick input ends
  • When a drag starts on this
  • When a drag stops on this
  • When this is slung

State

  • When a Variable changes
  • When a variable reaches a value
  • When this gains a Tag
  • When this loses a tag

Inventory

Motion

  • When velocity changes
  • When this stops moving

Clock

  • When the clock reaches a beat
  • When the clock reaches a bar

Sound

  • When a track plays a note

Camera

  • When this enters the camera viewport
  • When this exits the camera viewport

Draw

  • When the animation ends
  • When the animation loops
  • When the animation frame changes
  • When the animation reaches a specific frame