{"id":1904,"date":"2024-04-05T10:58:46","date_gmt":"2024-04-05T09:58:46","guid":{"rendered":"https:\/\/www.katsbits.com\/site\/?p=1904"},"modified":"2024-04-05T10:58:46","modified_gmt":"2024-04-05T09:58:46","slug":"set-up-an-end-map-trigger","status":"publish","type":"post","link":"https:\/\/www.katsbits.com\/site\/set-up-an-end-map-trigger\/","title":{"rendered":"RtCW SP End Map &#038; Change Map Trigger Entity Chain"},"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\/set-up-an-end-map-trigger\/#The_End\" >The End<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>The &quot;<b>Exit<\/b>&quot; trigger itself is another  of several undocumented &#8216;functions&#8217; and &#8216;commands&#8217; that are  hardwired into the game so the properties and setup is not explained nearly as well as with other entities, where such information is available.<\/p>\n<blockquote style=\"background-color: #ddecf3; color: #000;\"><p><b>Download<\/b>: <a href=\"https:\/\/www.katsbits.com\/files\/rtcw_sp\/kill-ai.zip\" title=\"Download trigger kill sample for for RtCW SP\">End map\/change map trigger source<\/a> (c. 250 KB | *.map, *.bsp)<\/p><\/blockquote>\n<h3><span class=\"ez-toc-section\" id=\"The_End\"><\/span>The End<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The &quot;<b>End map<\/b>&quot; trigger is the walk-able exit trigger at the end of a level, usually indicated by the appearance of the &quot;<b>Exit<\/b>&quot; sign (text) bottom-middle  of the screen with a &#8216;health bar&#8217; below &#8211;  the player is usually able to walk a few paces before the current level exits and the next one loads.<\/p>\n<p>Although this transition can be done via level script it is more often actioned through the use of   game Entities with specific properties. The following explains what needs to be done to set-up the End or Change Level trigger event using entities and level script.<\/p>\n<div class=\"content_images\"><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-end-map-trigger\/rtcw-end-map-trigger.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/rtcw-end-map-trigger\/rtcw-end-map-trigger_sml.jpg\" alt=\"RtCW endmap trigger\" title=\"RtCW endmap trigger\" width=\"428\" height=\"241\" border=\"0\" \/><\/a><\/p>\n<p>Setting up the &#8220;endmap&#8221; trigger in GtkRadiant ( from &quot;escape1&quot; sample map)<\/p>\n<\/p><\/div>\n<p>To get this to work properly you <b>need two trigger fields<\/b>, one directly behind the other (when using an entity chain and not using a triggered script). The first is a <b>func_inv_user<\/b> with <b>key\/value<\/b> pair of;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000; font-family: courier;\"><p> cursorhint \/ hint_exit<\/p><\/blockquote>\n<p>Targeted at the second one behind it (don&#8217;t know if you need to do this atm). This trigger field sets the &#8216;thickness&#8217; or the &#8216;distance&#8217; into which a player can walk before hitting the 2nd trigger directly behind so you can make it a lot thicker&#8230; The second is a &#8216;normal&#8217; trigger field; trigger_once, trigger_multiple or ai_trigger. This is the actual trigger that makes the call to change the map. Keep in mind it&#8217;ll need a <b>key\/value<\/b> of;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000; font-family: courier;\"><p> wait \/ [time value]<\/p><\/blockquote>\n<p>Otherwise it&#8217;ll trigger once only and the player won&#8217;t be able to get out of the map &#8211; in the case of missing an objective and going back for it on returning to exit the trigger will have been fired previously. This second trigger also needs to be the one that points to your &#8216;changelevel&#8217; call in the script file <\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000; font-family: courier;\"><p> player<br \/>\n            {<br \/>\n            &nbsp; &nbsp; &nbsp;spawn<br \/>\n            &nbsp; &nbsp; &nbsp;{<br \/>\n            &nbsp; &nbsp; &nbsp;}<\/p>\n<p>            &nbsp; &nbsp; &nbsp;trigger endmap<br \/>\n            &nbsp; &nbsp; &nbsp;{<br \/>\n            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;changelevel mapname persistent<br \/>\n            &nbsp; &nbsp; &nbsp;}<br \/>\n          }<\/p><\/blockquote>\n<p>Note the word &#8216;<b>endmap<\/b>&#8216;, this is very important as that&#8217;s the &#8216;hardwired&#8217; command which makes the exit trigger behave correctly &#8211; without it you don&#8217;t see the exit &#8216;health&#8217; indicator and the trigger itself won&#8217;t work properly &#8211; you need to have &#8216;endmap&#8217; as your script_trigger; once you&#8217;ve targeted the in game trigger field at this you&#8217;ll find you have a nice blue health bar on walking into the exit trigger&#8230; (it goes red if an objective is still left incomplete). Done.<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1905,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[327,331,328,106,109,108,107,23,195,483],"class_list":["post-1904","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-map","tag-bsp","tag-entities","tag-gtkradiant","tag-level-design","tag-level-editing","tag-radiant","tag-rtcw","tag-single-player","tag-trigger"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1904","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=1904"}],"version-history":[{"count":1,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1904\/revisions"}],"predecessor-version":[{"id":1906,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1904\/revisions\/1906"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/media\/1905"}],"wp:attachment":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/media?parent=1904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/categories?post=1904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/tags?post=1904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}