{"id":5692,"date":"2026-08-08T00:22:39","date_gmt":"2026-08-07T22:22:39","guid":{"rendered":"https:\/\/candy-arts.com\/?page_id=5692"},"modified":"2026-08-17T06:22:40","modified_gmt":"2026-08-17T04:22:40","slug":"candy-triggers","status":"publish","type":"page","link":"https:\/\/candy-arts.com\/index.php\/candy-triggers\/","title":{"rendered":"Candy Triggers"},"content":{"rendered":"\n<p class=\"has-text-align-center has-background has-small-font-size wp-block-paragraph\" style=\"border-top-style:none;border-top-width:0px;border-right-color:var(--wp--preset--color--white);border-right-width:100px;border-bottom-style:none;border-bottom-width:0px;border-left-color:var(--wp--preset--color--white);border-left-width:100px;background-color:#fccf004f;margin-right:0;margin-left:0;padding-top:10px;padding-right:0px;padding-bottom:10px;padding-left:0px\"><strong>Coming Soon!<\/strong><br>Candy Triggers is scheduled for release in August 2026.<br>Stay tuned for updates!<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-6488167e wp-block-columns-is-layout-flex\" style=\"padding-right:0;padding-left:0\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66%\">\n<h2 class=\"wp-block-heading\">Candy Triggers<\/h2>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<div class=\"wp-block-buttons is-horizontal is-content-justification-right is-layout-flex wp-container-core-buttons-is-layout-13f386c9 wp-block-buttons-is-layout-flex\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);padding-right:0;padding-left:0\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-background wp-element-button\" style=\"background-color:#a1a1a1\"><br>Buy Now<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-text-align-center has-vivid-cyan-blue-color has-text-color wp-block-paragraph\"><strong>Universal State Machine for Triggers &amp; Switches<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Candy Triggers is the tool you need for activating and controlling objects in the game environment.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Picture the following:<br>\u2022 A switch that opens and closes a door when the player interacts with it.<br>\u2022 A dial that moves a platform to several different positions.<br>\u2022 A console that controls multiple devices.<br>\u2022 A combination lock that requires setting multiple levers in the correct position.<br>\u2022 A pressure plate that sets off a trap when stepped on.<br>\u2022 An alarm that activates after 5 minutes.<br>\u2022 Enemy patrols that become suspicious when the player makes noise nearby.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All these events require a trigger: code that activates them. Candy Triggers allows you to create these triggers by just configuring variables, from one universal script!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"margin-top:0;margin-bottom:0\"><strong>Candy Triggers offers the following features:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Any input can drive a trigger: player interaction, key presses, collision, timers, proximity, custom game events \u2014 anything you can call from code.<\/li>\n\n\n\n<li>States can trigger effects on any type of objects \u2014 doors, machines, vehicles, traps, NPCs, even other triggers.<\/li>\n\n\n\n<li>Compatible with any effect you can think of: you program it, it triggers it.<\/li>\n\n\n\n<li>Triggers can work on any number of objects and effects at once.<\/li>\n\n\n\n<li>Setup cooldowns before more effects can be triggered, or automatic triggers after a countdown.<\/li>\n\n\n\n<li>Entirely configurable through the Inspector or through Candy Tools.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-default\" style=\"margin-top:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--60)\"\/>\n\n\n\n<div class=\"wp-block-group has-light-green-cyan-background-color has-background is-vertical is-content-justification-stretch is-layout-flex wp-container-core-group-is-layout-ef5d2655 wp-block-group-is-layout-flex\" style=\"border-top-left-radius:48px;border-top-right-radius:48px;border-bottom-left-radius:48px;border-bottom-right-radius:48px;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--70)\">\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Easy Setup<\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To start, create a trigger in your game environment &#8212; a switch, a pressure plate, a camera&#8230; Then just attach the Candy Triggers script to it, or to one of its child nodes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After that, just configure the trigger in the Inspector: create trigger &#8216;states&#8217;, select which objects each state targets and what effects are triggered, indicate which states can be switched to, and optionally setup timers.<\/p>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-default\"\/>\n\n\n\n<div class=\"wp-block-group has-pale-cyan-blue-background-color has-background is-vertical is-content-justification-stretch is-layout-flex wp-container-core-group-is-layout-ef5d2655 wp-block-group-is-layout-flex\" style=\"border-top-left-radius:48px;border-top-right-radius:48px;border-bottom-left-radius:48px;border-bottom-right-radius:48px;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--70)\">\n<div class=\"wp-block-media-text is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><a href=\"https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Example-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Example-3-1024x576.png\" alt=\"\" class=\"wp-image-5766 size-full\" srcset=\"https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Example-3-1024x576.png 1024w, https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Example-3-300x169.png 300w, https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Example-3-768x432.png 768w, https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Example-3-1536x864.png 1536w, https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Example-3.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Targ<\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong>ets &amp; Effects<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A target can be any node in your project, and any effects you can program can be triggered on it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Candy Triggers just calls a function on each target, and passes the selected effects as an array. You just need to write the code in that function: iterate through the array, and use a match statement to program what each effect does.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, for opening a door, just make the code change the sprite (or animate the door opening), play a sound, and disable collisions so characters can walk through.<\/p>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Triggers can target other triggers for advanced logic chaining, and they can even target themselves &#8212; such as a lever that opens a door and changes its own position visually on screen.<\/p>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-group has-light-green-cyan-background-color has-background is-vertical is-content-justification-stretch is-layout-flex wp-container-core-group-is-layout-ef5d2655 wp-block-group-is-layout-flex\" style=\"border-top-left-radius:48px;border-top-right-radius:48px;border-bottom-left-radius:48px;border-bottom-right-radius:48px;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--70)\">\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>States<\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re not familiar with state machines, triggers work by navigating through states:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each state is a unique configuration that decides what effects are triggered on which targets, whether timers run for various purposes, and which other states can be reached.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, a lever for a door might have two states: &#8216;opened&#8217; and &#8216;closed&#8217;. It starts in the closed state, and from there it can switch to the &#8216;open&#8217; state, which opens the door and animates the lever to make it change position. The &#8216;open&#8217; state can then switch back to the &#8216;closed&#8217; state.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s very intuitive logic, and even beginners should find it easy to learn.<\/p>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-group has-pale-cyan-blue-background-color has-background is-vertical is-content-justification-stretch is-layout-flex wp-container-core-group-is-layout-ef5d2655 wp-block-group-is-layout-flex\" style=\"border-top-left-radius:48px;border-top-right-radius:48px;border-bottom-left-radius:48px;border-bottom-right-radius:48px;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--70)\">\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>State Navigation<\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To make triggers switch to another state, you only need to call a function in the Candy Triggers script, and give it two arguments: the navigation method to use, and the state to switch to.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The function can be called any way you want: the player interacting with an object, walking on (colliding) a trap, entering a camera or enemy&#8217;s field of view, pressing a key, game events unrelated to the player, a timer timeout&#8230;<\/p>\n\n\n\n<div class=\"wp-block-media-text has-media-on-the-right is-stacked-on-mobile\"><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\"><span style=\"text-decoration: underline;\">Four navigation methods are provided<\/span>:<br><strong>Jump<\/strong> &#8212; Switch directly to an arbitrary state, with optional blacklist\/whitelist that defines which states are accessible from a given state.<br><strong>Next\/Previous<\/strong> &#8212; For each state, define any states as &#8216;Next&#8217; and &#8216;Previous&#8217;; this method browses through the chain until landing on a state that is available.<br><strong>Repeat<\/strong> &#8212; Simply repeat the effects and timers of the current state.<br><strong>Countdown<\/strong> &#8212; Inside any state, configure a timer that will automatically switch to another state upon reaching 0.<\/p>\n<\/div><figure class=\"wp-block-media-text__media\"><a href=\"https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Candy-Triggers-Example-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"635\" src=\"https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Candy-Triggers-Example-1-1024x635.png\" alt=\"\" class=\"wp-image-5744 size-full\" srcset=\"https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Candy-Triggers-Example-1-1024x635.png 1024w, https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Candy-Triggers-Example-1-300x186.png 300w, https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Candy-Triggers-Example-1-768x476.png 768w, https:\/\/candy-arts.com\/wp-content\/uploads\/2026\/08\/Candy-Triggers-Example-1.png 1347w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"text-decoration: underline;\">States also have three status options that guide navigation<\/span>:<br><strong>OK<\/strong> &#8212; The state is available, and all effects and timers will be triggered.<br><strong>Inactive<\/strong> &#8212; The state can be switched to, but won&#8217;t trigger its effects and timers.<br><strong>Disabled<\/strong> &#8212; The state can&#8217;t be switched to or repeated. Next\/Previous will skip over it when browsing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Together, these options enable many possibilities, from simple toggle switches to advanced interfaces that control multiple objects through various buttons.<br>This also enables &#8216;locked&#8217; states that are only accessible once some conditions are fulfilled (or rendered permanently inaccessible), or &#8216;hidden&#8217; states that can only be switched to by code or timers.<\/p>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-group has-light-green-cyan-background-color has-background is-vertical is-content-justification-stretch is-layout-flex wp-container-core-group-is-layout-ef5d2655 wp-block-group-is-layout-flex\" style=\"border-top-left-radius:48px;border-top-right-radius:48px;border-bottom-left-radius:48px;border-bottom-right-radius:48px;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--70)\">\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Timers<\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Timers can be setup inside each state, and activate when the state is switched to:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Delay<\/strong> &#8212; Upon reaching a state, wait a specified amount of time before triggering effects.<br><strong>Countdown<\/strong> &#8212; Automatically switch to another state after a specified amount of time.<br><strong>Cooldown<\/strong> &#8212; Prevent switching to any other state until a specified amount of time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These are very simple to configure &#8212; just write a countdown value or leave it empty &#8212; but they open a lot of possibilities: doors that automatically close, traps that need time to re-arm before they can activate again, alarms that activate unless disabled in time, enemies that stop looking for the player once enough time has passed&#8230;<\/p>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-group has-pale-cyan-blue-background-color has-background is-vertical is-content-justification-stretch is-layout-flex wp-container-core-group-is-layout-ef5d2655 wp-block-group-is-layout-flex\" style=\"border-top-left-radius:48px;border-top-right-radius:48px;border-bottom-left-radius:48px;border-bottom-right-radius:48px;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--70)\">\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Expansion and Customization<\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The code contains many calls to a hook function, which you can customize to inject custom behavior at various steps in the logic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For maximum convenience, each instance can use a different hook function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As usual with our addons, you have access to the full code.<\/p>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-group has-light-green-cyan-background-color has-background is-vertical is-content-justification-stretch is-layout-flex wp-container-core-group-is-layout-ef5d2655 wp-block-group-is-layout-flex\" style=\"border-top-left-radius:48px;border-top-right-radius:48px;border-bottom-left-radius:48px;border-bottom-right-radius:48px;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--70)\">\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong><strong><strong><strong><strong><strong>Pricing<\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Indie licenses:<\/strong><br>\u2022 Candy Triggers costs <strong>\u20ac10<\/strong> only.<br>\u2022 This includes all Indie license tiers (Free, Starter and Pro), and no additional payment is required when upgrading tiers.<br>\u2022 Indie Licenses are valid for one individual. They last a lifetime and can be used by the same license holder for <span style=\"text-decoration: underline;\">unlimited projects<\/span> without additional payment.<br>\u2022 Indie licenses are a special offer to support small projects, priced considerably below the value our assets provide. See the <a href=\"https:\/\/candy-arts.com\/index.php\/indie-project-checklist\/\" data-type=\"page\" data-id=\"4504\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Indie Project Checklist<\/strong><\/a> to determine if your project qualifies.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Studio licenses:<\/strong><br>\u2022 Candy Triggers is a Minor Asset. Studio projects can use our Minor Assets freely as long as they pay a minimum royalty rate of 1%.<br>\u2022 To clarify: Studio projects that already pay 1% or more for the use of other Major or Minor Assets don&#8217;t have to pay additional royalties.<br>\u2022 Studio Licenses apply per project and have no seat, budget or revenue limits. Royalties are calculated on gross revenue. Studio projects that earn 0 pay 0.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Features are identical across <strong>all<\/strong> licenses.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See our <strong><a href=\"https:\/\/candy-arts.com\/index.php\/licensing\/\" data-type=\"page\" data-id=\"2493\" target=\"_blank\" rel=\"noreferrer noopener\">Licensing<\/a><\/strong> page for more details.<\/p>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-group has-palette-color-3-background-color has-background is-vertical is-content-justification-stretch is-layout-flex wp-container-core-group-is-layout-ef5d2655 wp-block-group-is-layout-flex\" style=\"border-top-left-radius:48px;border-top-right-radius:48px;border-bottom-left-radius:48px;border-bottom-right-radius:48px;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--70)\">\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong><strong><strong><strong><strong><strong><strong>Compatibility<\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Godot:<\/strong><br>Candy Triggers is compatible with Godot Engine 4.<br>\u2022 It&#8217;s officially supported for Godot 4.4+.<br>\u2022 Godot 4.3 is not officially supported but appears to be fully compatible.<br>\u2022 Godot 4.0 to 4.2 are not officially supported, but a modified version of Candy Triggers is provided.<br>\u2022 Candy Tools features only work in Godot 4.3+.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Operating System &amp; Hardware:<\/strong><br>Dependent on Godot: hardware and operating systems that can run Godot can run Candy Triggers.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Coming Soon!Candy Triggers is scheduled for release in August 2026.Stay tuned for updates! Candy Triggers Universal State Machine for Triggers &amp; Switches Candy Triggers is the tool you need for activating and controlling objects in the game environment. Picture the following:\u2022 A switch that opens and closes a door when the player interacts with it.\u2022 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5692","page","type-page","status-publish","hentry"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":7}},"_links":{"self":[{"href":"https:\/\/candy-arts.com\/index.php\/wp-json\/wp\/v2\/pages\/5692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/candy-arts.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/candy-arts.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/candy-arts.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/candy-arts.com\/index.php\/wp-json\/wp\/v2\/comments?post=5692"}],"version-history":[{"count":34,"href":"https:\/\/candy-arts.com\/index.php\/wp-json\/wp\/v2\/pages\/5692\/revisions"}],"predecessor-version":[{"id":5903,"href":"https:\/\/candy-arts.com\/index.php\/wp-json\/wp\/v2\/pages\/5692\/revisions\/5903"}],"wp:attachment":[{"href":"https:\/\/candy-arts.com\/index.php\/wp-json\/wp\/v2\/media?parent=5692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}