{"id":1907,"date":"2024-04-05T11:19:50","date_gmt":"2024-04-05T10:19:50","guid":{"rendered":"https:\/\/www.katsbits.com\/site\/?p=1907"},"modified":"2024-04-05T11:19:50","modified_gmt":"2024-04-05T10:19:50","slug":"props-flamethrower-trigger-set-up","status":"publish","type":"post","link":"https:\/\/www.katsbits.com\/site\/props-flamethrower-trigger-set-up\/","title":{"rendered":"RtCW Entity Chain Trigger for props_flamethrower Effect"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.katsbits.com\/site\/props-flamethrower-trigger-set-up\/#Required_Entities\" >Required Entities<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.katsbits.com\/site\/props-flamethrower-trigger-set-up\/#Connecting_Entities\" >Connecting  Entities<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.katsbits.com\/site\/props-flamethrower-trigger-set-up\/#Entity_Settings\" >Entity Settings<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.katsbits.com\/site\/props-flamethrower-trigger-set-up\/#Entity_Placement\" >Entity Placement<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.katsbits.com\/site\/props-flamethrower-trigger-set-up\/#Flamethrower_Wont_Turn_Off_Once_Triggered\" >Flamethrower Won&#8217;t Turn Off Once Triggered<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.katsbits.com\/site\/props-flamethrower-trigger-set-up\/#Compile_In-Game_Test\" >Compile &amp; In-Game Test<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>Like most actions in custom single player levels for Return to Castle Wolfenstein they can be triggered directly through the use of an entity or, indirectly through script event &#8211; the former is easier, the latter allows for more complex interactions between the game and what the player does.<\/p>\n<blockquote style=\"background-color: #ddecf3; color: #000;\"><p><b>Download<\/b>: <a href=\"https:\/\/www.katsbits.com\/files\/rtcw_sp\/props-flamethrower.zip\" title=\"Download the RtCW example made for setting up the props_flamethrower effect\">props_flamethrower source<\/a> (c. 250 KB | *.map, *.bsp)<\/p><\/blockquote>\n<p>The following tutorial explains how to set-up a props_flamethrower entity in a single player environment so it&#8217;s triggered directly by the user (player) through a series of entities called an &#8216;entity chain.<\/p>\n<p>The tutorial assumes basic knowledge of  using GTK Radiant, compiling and testing levels in-game.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Required_Entities\"><\/span>Required Entities<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"#top\" target=\"_self\" rel=\"noopener\"><\/a>For this effect to work correctly it&#8217;s best to use a chain of entities rather than triggering the props_flamethrower entity directly, in a literal sense, so at a minimum a &#8216;trigger&#8217; is needed along with a &#8216;relay&#8217; and a &#8216;target&#8217;. Typically this means a &quot;<i>trigger<\/i>&quot; is a brush based entity, in this instance that&#8217;s a &#8216;<b>trigger_once<\/b>&#8216;, &#8216;<b>trigger_multiple<\/b>&#8216; or &#8216;<b>func_button<\/b>&#8216;; the &quot;<i>relay<\/i>&quot; is a &#8216;<b>target_relay<\/b>&#8216;, an entity that usually sits between activator and event, often preventing trigger actions from backfiring on to the player. And two types of &quot;<i>target<\/i>&quot;, one being the &#8216;<b>props_flamethrower<\/b>&#8216; itself, the other being an &#8216;<b>info_notnull<\/b>&#8216; for the flamethrower.<\/p>\n<div class=\"content_images\"><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/rtcw-props-flamethrower-entities-needed.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/rtcw-props-flamethrower-entities-needed_sml.jpg\" alt=\"Entities needed to set-up a trigger props_flamethrower event\" width=\"428\" height=\"286\" border=\"0\" title=\"Entities needed to set-up a trigger props_flamethrower event\" \/><\/a><\/p>\n<p>Entities needed to set-up a trigger props_flamethrower event<\/p>\n<\/p><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Connecting_Entities\"><\/span>Connecting  Entities<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The key to correctly setting up the props_flamethrower is to think of the action as a two part process. First is the flamethrower itself; the entity needs a direction, a &#8216;<i>target<\/i>&#8216; at which the flames will be &#8216;thrown&#8217;, the &#8216;info_notnull&#8217; entity is used for this. Select the props_flamethrower then the info_notnull, use <b>Ctrl+K<\/b> to connect the entities together, the props_flamethrower <i><b>targets<\/b><\/i> the info_notnull &#8211; &#8216;<b>props_flamethrower &gt; info_notnull<\/b>&#8216; and <i><b>not<\/b><\/i> &#8216;<b>info_notnull &gt; props_flamethrower<\/b>&#8216;.<\/p>\n<p>Second is the trigger and it&#8217;s relay which, depending on the situation the effect is to be used in, will be a brush based &#8216;<b>trigger_once<\/b>&#8216;, a &#8216;<b>trigger_multiple<\/b>&#8216;, a &#8216;<b>func_button<\/b>&#8216; or some other user based actuator (for example &#8216;<b>func_invisible_user<\/b>&#8216;). This this component of the set up the &#8216;trigger&#8217; is connected <b><i>to<\/i><\/b> the target_relay &#8211; &#8216;<b>trigger_once &gt; target_relay<\/b>&#8216; and <b><i>not<\/i><\/b> &#8216;<b>target_relay &gt; trigger_once<\/b>&#8216;.<\/p>\n<p>Once both parts are set up, the target_relay section then needs to be connected to the props_flamethrower component with the result that the full entity chain looks similar to the following; &#8216;<b>trigger_once &gt; target_relay &gt; props_flamethrower (<i>&gt; info_notnull<\/i>)<\/b>&#8216;.<\/p>\n<div class=\"content_images\"><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/rtcw-flamethrower-trigger-set-up.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/rtcw-flamethrower-trigger-set-up_sml.jpg\" alt=\"Connecting the entities together to form an &quot;entity chain&quot; which triggers the props_flamethrower\" width=\"428\" height=\"357\" border=\"0\" title=\"Connecting the entities together to form an &quot;entity chain&quot; which triggers the props_flamethrower\" \/><\/a><\/p>\n<p>Connecting the entities together to form an &quot;entity chain&quot; which triggers the props_flamethrower<\/p>\n<\/p><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Entity_Settings\"><\/span>Entity Settings<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Although there are a number of entity settings available for  use in this situation (read the available per-entity information in the &#8216;<b>Entity Inspector<\/b>&#8216;, &quot;<b>N<\/b>&quot;), there is only really one general consideration that need to be kept in mind with the props_flamethrower effect and that&#8217;s the &#8216;<b>wait<\/b>&#8216; time involved, especially  if a trigger_multiple is used. Ideally the props_flamethrower needs a &#8216;<b>duration\/[<i>n<\/i>]<\/b>&#8216; key\/value pairing set (where &quot;[<i>n<\/i>]&quot; is a number of seconds) so  the blast from the effect lasts for a  fix amount of time. This is important as it relates to the rest of the set up in such a way  that similar &#8216;wait&#8217; durations need to be  set for any &#8216;<i>constant<\/i>&#8216; trigger to stop them firing at the entity in succession, causing an infinite loop.<\/p>\n<p> So, any trigger_multiple or other trigger than can be fired constantly whilst the player or an AI is activating it needs a &#8216;<b>wait\/[<i>n<\/i>]<\/b>&#8216; key\/value pairing (where &quot;[<i>n<\/i>]&quot; is a length of time in seconds) that&#8217;s at least two or more seconds longer in duration than the value set in the props_flamethrower entity itself. For example, if the flamethrower is set for a duration of &quot;3&quot; seconds (&quot;duration\/3&quot;), a trigger_multiple should have a wait time of &quot;5&quot; (&quot;wait\/5&quot;), similarly so should a func_button (&quot;wait\/5&quot;) and so on; this prevents the re-activation of the trigger before the flamethrower effect has had time to reset and switch off ready for the next trigger event.<\/p>\n<div class=\"content_images\"><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/props-flamethrower-duration-time.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/props-flamethrower-duration-time_sml.jpg\" alt=\"&quot;duration[n]&quot; key\/value pair setting the length of time of the flamethrower effect\" width=\"428\" height=\"271\" border=\"0\" title=\"&quot;duration[n]&quot; key\/value pair setting the length of time of the flamethrower effect\" \/><\/a><\/p>\n<p>&quot;duration[n]&quot; key\/value pair setting the length of time of the flamethrower effect<\/p>\n<\/p><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Entity_Placement\"><\/span>Entity Placement<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Placement of the props_flamethrower is critical because if it&#8217;s buried or any part of it is occluded it stands a good chance of &#8216;breaking&#8217; and simply not working. This means it must be place free of any brushwork; it can be touching but not buried, channels may need to be cut into brushwork to make allowance for this.<\/p>\n<div class=\"content_images\"><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/props-flamethrower-placement.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/props-flamethrower-placement_sml.jpg\" alt=\"Placement of the entity is critical for thie effect to work\" width=\"428\" height=\"285\" border=\"0\" title=\"Placement of the entity is critical for thie effect to work\" \/><\/a><\/p>\n<p>Placement of the entity is critical for the effect to work<\/p>\n<\/p><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Flamethrower_Wont_Turn_Off_Once_Triggered\"><\/span>Flamethrower Won&#8217;t Turn Off Once Triggered<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In certain circumstances the props_flamethrower entity won&#8217;t turn off once it&#8217;s activated <i>unless<\/i> it receives another activation impulse (the trigger impulses &#8216;toggle&#8217; the effect on\/off); for instance, once triggered, walking back through a trigger_multiple will sent an impulse causing the effect to turn off. One way to get around this problem, without using complex scripting, is to use a &#8216;<b>target_delay<\/b>&#8216; entity which fires a few seconds after it has been triggered, the impulse <i>it<\/i> then sends out deactivates the flamethrower.<\/p>\n<p>For this to work correctly, the target_delay needs a &#8216;<b>wait\/[<i>n<\/i>]<\/b>&#8216; key\/valuing paring that&#8217;s <i><b>less than<\/b><\/i> the time between each reset of the main user trigger. For example, if a <i>trigger_multiple<\/i>, or <i>func_button<\/i> have a &#8216;wait&#8217; time of &quot;5&quot; seconds, the target_delay would <i>need to have a wait time of <b>less than that<\/b><\/i>, say &quot;3&quot; or &quot;4&quot; seconds. This makes sure the chain has time to turn off the effect and reset itself before the next triggering.<\/p>\n<p>To set this up make sure the target_delay has the same &quot;target_name&quot; as the props_flamethrower, this ensures that the target_relay entities are pointing <b><i>at<\/i><\/b> both the delay <i><b>and<\/b><\/i> the flamethrower so they  get triggered at the same time.<\/p>\n<div class=\"content_images\"><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/target-delay-turn-off-flamethrower.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/target-delay-turn-off-flamethrower_sml.jpg\" alt=\"Using a target_delay to de-activate the flamethrower effect\" width=\"428\" height=\"271\" border=\"0\" title=\"Using a target_delay to de-activate the flamethrower effect\" \/><\/a><\/p>\n<p>Using a target_delay to de-activate the flamethrower effect<\/p>\n<\/p><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Compile_In-Game_Test\"><\/span>Compile &amp; In-Game Test<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Compile the level and load into RtCW using &quot;<b>\/spdevmap [<i>mapname<\/i>]<\/b>&quot; from the in-game console, if the entity chain has been set up correctly the props_flamethrower effect should fire on being triggered by any of the activators placed in level. Check durations and timing to make sure the flamethrower stops before it&#8217;s re-triggered by one of the other activators; if it seems to stay active longer than expected go back to GTK radiant and inspect the entity settings to make sure the time related key\/value pairings are correct.<\/p>\n<div class=\"content_images\"><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/rtcw-props-flamethrower-entity-set-up.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/rtcw-props-flamethrower-entity-set-up_sml.jpg\" alt=\"Entity set-up to trigger the props_flamethrower effect in single player RtCW levels\" width=\"428\" height=\"271\" border=\"0\" title=\"Entity set-up to trigger the props_flamethrower effect in single player RtCW levels\" \/><\/a><\/p>\n<p>Entity set-up to trigger the props_flamethrower effect in single player RtCW levels<\/p>\n<p>              <a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/rtcw-props-flamethrower-in-game.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-props-flamethrower\/rtcw-props-flamethrower-in-game_sml.jpg\" alt=\"props_flamethrower effect in game\" width=\"428\" height=\"254\" border=\"0\" title=\"props_flamethrower effect in game\" \/><\/a><\/p>\n<p>props_flamethrower effect in game showing the func_button that activated it in the foreground waiting to be reset (after &quot;5&quot; seconds)<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1908,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[327,331,328,106,484,109,108,107,23,483],"class_list":["post-1907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-map","tag-bsp","tag-entities","tag-gtkradiant","tag-inspector","tag-level-design","tag-level-editing","tag-radiant","tag-rtcw","tag-trigger"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/comments?post=1907"}],"version-history":[{"count":1,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1907\/revisions"}],"predecessor-version":[{"id":1909,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1907\/revisions\/1909"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/media\/1908"}],"wp:attachment":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/media?parent=1907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/categories?post=1907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/tags?post=1907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}