{"id":175,"date":"2019-06-25T14:38:24","date_gmt":"2019-06-25T14:38:24","guid":{"rendered":"http:\/\/www.shmupcreator.com\/doc\/?docs=shmupcreator\/objects-and-entities\/trigger"},"modified":"2026-06-25T13:28:03","modified_gmt":"2026-06-25T13:28:03","slug":"trigger","status":"publish","type":"docs","link":"https:\/\/www.shmupcreator.com\/doc\/?docs=shmupcreator\/objects-and-entities\/triggers-and-game-objects\/trigger","title":{"rendered":"Trigger"},"content":{"rendered":"<h3>WHAT IT&#8217;S FOR:<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1065\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2020\/01\/triggerLinks.gif\" alt=\"\" width=\"285\" height=\"204\" \/><\/p>\n<p>\u00a0<\/p>\n<p>Triggers can have different behaviors:<\/p>\n<p>&#8211; <strong>stay activated<\/strong>: once the trigger is activated, it stays activated. It means that it can be activated only once.<\/p>\n<p>&#8211; <strong>switch mode<\/strong>: the trigger behave like a switch: it can be activated or deactivated, as many time as we want, by another trigger for instance.<\/p>\n<p>&#8211; <strong>switch mode but play until the end<\/strong>: the trigger behaves like a switch, but once activated, it will play until its duration, then deactivate itself. Useful for trigger with a duration.<\/p>\n<p>For example, you can create a trigger with a player zone activation type, and plug it to an FX that emits light.<br \/>If the trigger behavior is &#8220;stay activated&#8221;, as soon as the player goes in the zone, the light will shine and stays on, even if the player goes out of the zone.<br \/>If the trigger behavior is &#8220;switch mode&#8221;, as soon as the player goes in the zone, the light will shine, but as soon as the player goes out of the zone the light will switch off.<br \/>You can go in or out of the zone to switch on or off the light, as many times as you want.<br \/><span style=\"font-size: 1rem;\"><br \/>In another example, we insert a timer between the trigger and the FX, the trigger is set to &#8220;switch mode&#8221;, and the timer is set to &#8220;switch mode but play until the end&#8221;.<br \/>In this case, if the player goes in the zone, the light will stay on for 1 second.<br \/>But, note that if the player goes in the zone and quickly goes out, the light will still stay on for 1 second, because the timer will play until the end before resetting itself.<\/span><\/p>\n<h3>PROPERTIES:<\/h3>\n<p><strong>BEHAVIOR<br \/><\/strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/>\u00a0Stay activated:\u00a0once the trigger is activated, it stays activated.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/>\u00a0Switch mode: the trigger behave like a switch: it can be activated or deactivated, as many time as we want.<\/p>\n<p><strong>ACTIVE WHEN<br \/><\/strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/>\u00a0<strong>Viewed by the camera<\/strong>: as soon as the camera sees the trigger, it will activate. Note that it is the default behavior for every trigger.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/>\u00a0<strong>player goes in the zone<\/strong>: as soon as the player touch or goes inside the zone, the trigger activates.<br \/>\u00a0 \u00a0 \u00a0<strong>Zone Area<\/strong><br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-448\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/spinner1float.jpg\" alt=\"\" width=\"60\" height=\"22\" \/>\u00a0<strong>Width:<\/strong> the width of the zone<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-448\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/spinner1float.jpg\" alt=\"\" width=\"60\" height=\"22\" \/>\u00a0<strong>Height:<\/strong> the height of the zone<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/><strong>Enemies go in the zone:<\/strong> as soon as any enemy touch or go inside the zone, the trigger activates.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/><strong>Plugged entities state is:<\/strong> test if the entities plugged to the In plug (the left one) are at a certain state:<br \/>\u00a0 \u00a0 &#8211; All dead: when all the plugged entities are dead, the trigger will activate.<br \/>\u00a0 \u00a0 &#8211; All alive: if all the plugged entities are alive, the trigger will activate.<br \/>\u00a0 \u00a0 &#8211; Some alive: if one or more entities are alive, the trigger will activate.<br \/>\u00a0 \u00a0 &#8211; Some dead: if one or more entities are dead, the trigger will activate.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/>\u00a0<strong>Player scores more than<\/strong>: as soon as the player score goes more than this value, the trigger will activate.<br \/>\u00a0 \u00a0 <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-440\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/spinner.jpg\" alt=\"\" width=\"60\" height=\"22\" \/>\u00a0Score spinner:<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/> <strong>Player killed more than<\/strong>: as soon as the player killed more enemies than this value, the trigger will activate.<br \/>\u00a0 \u00a0 \u00a0 <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-440\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/spinner.jpg\" alt=\"\" width=\"60\" height=\"22\" \/><br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/><strong> All level&#8217;s waves are dead:<\/strong> if all the enemies of this level are dead, the trigger will activate. It can be used as a Win condition if you plug this trigger to a End of level trigger.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/>\u00a0<strong>Enemies HP is<\/strong>: this condition checks if the plugged enemy life is more or less than this value. If yes, the trigger will activate.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/> <strong>Used continues are<\/strong>: this condition checks if the used continue number is more or less than a value.<\/p>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"featured_media":0,"parent":156,"menu_order":7,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-175","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=175"}],"version-history":[{"count":16,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/175\/revisions"}],"predecessor-version":[{"id":3030,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/175\/revisions\/3030"}],"up":[{"embeddable":true,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/156"}],"next":[{"title":"Player control","link":"https:\/\/www.shmupcreator.com\/doc\/?docs=shmupcreator\/objects-and-entities\/triggers-and-game-objects\/player-control","href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/2012"}],"wp:attachment":[{"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=175"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}