Difference between revisions of "Trigger"

From Castle Wiki
(Created page with "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 whil...")
 
m
Line 1: Line 1:
A '''Trigger''' is the part of a [[Rule]] that describes when to run that rule. All rules have exactly one trigger.
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 deck 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]].
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 ==
== List of triggers ==
Line 8: Line 8:
=== General ===
=== General ===


* When this collides with another actor
* When this collides with another [[Actor]]
* When this is created
* When this is created
* When this is destroyed
* When this is destroyed
Line 28: Line 28:
* When a [[Variable]] changes
* When a [[Variable]] changes
* When a variable reaches a value
* When a variable reaches a value
* When this gains a tag
* When this gains a [[Tag]]
* When this loses a tag
* When this loses a tag


Line 34: Line 34:


* When velocity changes
* When velocity changes
* When this tops moving
* When this stops moving


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


* When the clock reaches a beat
* When the clock reaches a beat
Line 43: Line 43:
=== Sound ===
=== Sound ===


* When a track plays a note
* When a [[Music|track]] plays a note


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


* When this enters the camera viewport
* When this enters the camera viewport
* When this exits the camera viewport
* When this exits the camera viewport


=== Draw ===
=== [[Art|Draw]] ===


* When the animation ends
* When the animation ends

Revision as of 21:39, 11 May 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

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