<li><aclass="backlink"title="Click to do a full-text search for this title"href="./Placing_a_GUI_In_a_Map?action=fullsearch&value=linkto%3A%22Placing+a+GUI+In+a+Map%22&context=180">Placing a GUI In a Map</a></li>
<liclass="wikilink"><ahref="./GettingStarted.html">GettingStarted</a></li><liclass="wikilink"><ahref="./ScriptFile.html">ScriptFile</a></li><liclass="wikilink"><ahref="./MakeAMod.html">MakeAMod</a></li><liclass="wikilink"><ahref="./LevelEditor.html">LevelEditor</a></li><liclass="wikilink"><ahref="./FXEditor.html">FXEditor</a></li><liclass="wikilink"><ahref="./GUIEditor.html">GUIEditor</a></li><liclass="wikilink"><ahref="./Sounds.html">Sounds</a></li><liclass="wikilink"><ahref="./Animations.html">Animations</a></li><liclass="wikilink"><ahref="./ArtReference.html">ArtReference</a></li><liclass="wikilink"><ahref="./DownloadableContent.html">DownloadableContent</a></li><liclass="wikilink"><ahref="./RecentChanges.html">RecentChanges</a></li><liclass="wikilink"><ahref="./FindPage.html">FindPage</a></li><liclass="wikilink"><ahref="./HelpContents.html">HelpContents</a></li><liclass="current"><ahref="./Placing_a_GUI_In_a_Map.html">Placing a GUI In a Map</a></li>
<spanclass="anchor"id="line-1"></span><pclass="line862">Placing GUIs into a map is an easy process. We won't go into extensive detail about creating a puzzle that's activated by a GUI as that's more the scope of the <ahref="./LevelEditor.html">LevelEditor</a> help documents, but we'll outline the basic process of placing a GUI into a level here. <spanclass="anchor"id="line-2"></span><spanclass="anchor"id="line-3"></span><pclass="line862">For simple puzzle GUIs that run a script, a <aclass="nonexistent"href="./Entity_FuncStatic.html">func_static</a> is bound to a GUI with the "gui" key in the <ahref="./LevelEditor_EntityReference.html">Entity</a> properties in the <ahref="./LevelEditor.html">LevelEditor</a>, with the key being set to the path of the GUI (for more about working with the <ahref="./LevelEditor.html">LevelEditor</a>, see the other help documents on this site). <spanclass="anchor"id="line-4"></span><spanclass="anchor"id="line-5"></span><pclass="line862">Some GUIs, such as lift GUIs, require a little more work. We'll use <strong>GUIs/movers/strogg/call_lift.gui</strong> as an example. <spanclass="anchor"id="line-6"></span><spanclass="anchor"id="line-7"></span><pclass="line862">Create a simple box map and place a brush to act as a simple second floor. Place a <ahref="./Entity_FuncElevator.html">func_elevator</a> in the map and place its position at the second floor. There are several monitor models to choose from in Quake 4. <strong>models/mapobjects/strogg/monitors/medium/med_just_screen.lwo</strong> is a common choice. Place one of these at the first floor. This will be the elevator call GUI that moves the elevator onto your floor if it isn't already there. <spanclass="anchor"id="line-8"></span><spanclass="anchor"id="line-9"></span><pclass="line862">Select the monitor. In the <ahref="./LevelEditor_EntityReference.html">Entity</a> editor, add the "gui" key and make its value the path to the call_lift gui, which is "guis/movers/strogg/call_lift.gui". Next, unselect your monitor and select your elevator. Copy the name of the elevator (i.e., "<ahref="./Entity_FuncElevator.html">func_elevator_3</a>"), and then unselect your elevator and select your monitor. In the monitor's <ahref="./LevelEditor_EntityReference.html">Entity</a> properties, put this name into the "target" key. <spanclass="anchor"id="line-10"></span><spanclass="anchor"id="line-11"></span><pclass="line874">Now you must set the GUI parms that tell the GUI what floor it's on so that when the script is activated it knows which animations to run and what values to set (so that if the elevator is already on that floor, it knows not to call it again). Looking in the call_lift.gui file, you'll see a comment in the Desktop: <spanclass="anchor"id="line-12"></span><spanclass="anchor"id="line-13"></span><pre> windowDef Desktop
<spanclass="anchor"id="line-15"></span> comment "gui_parm_floor = to 1 or 2 to indicate the floor the liftcall gui itself (not the lift) is on. 1 for the bottom floor, 2 for the top floor. gui_parm_strogg == 1 sets the lift gui to use non readable strogg text. Can also run a 'gui_parm_script' set to the name of your script and/or activate a trigger."
<spanclass="anchor"id="line-18"></span></pre><spanclass="anchor"id="line-19"></span><pclass="line862">Since our monitor is on the first floor, enter a new key into the monitor's <ahref="./LevelEditor_EntityReference.html">Entity</a> properties, "<ahref="./GUI_Parms.html">gui_parm_floor</a>" and set it to 1. Copy this monitor and paste it at the second floor. Change the value for "<ahref="./GUI_Parms.html">gui_parm_floor</a>" from 1 to 2 since this one is on the second floor. <spanclass="anchor"id="line-20"></span><spanclass="anchor"id="line-21"></span><pclass="line862">To finish making the elevator functional, select the elevator and make its "gui" <ahref="./LevelEditor_EntityReference.html">entity</a> key set to "guis/movers/strogg/activate_lift.gui". Set three more <ahref="./LevelEditor_EntityReference.html">entity</a> keys for the elevator: "floorPos_2" (the 3-coordinate position of the elevator when it's sitting at Floor 2), "floorPos_1" (the 3-coordinate position when it's sitting at Floor 1), and "floor", which is the floor it's going to be stopped at by default. If the two call_lift.gui monitors are the equivalent of the elevator call buttons outside of an elevator, the activate_lift.gui on the elevator itself is the equivalent of the row of buttons inside the elevator to make it move once you're inside. <spanclass="anchor"id="line-22"></span><spanclass="anchor"id="line-23"></span><pclass="line874">Now you've placed three GUIs in your map: two that call the elevator to whatever floor you're on if the elevator isn't already on that floor, and one on the elevator itself to move the elevator between floors. This is one of the more complex uses of world GUIs in Quake 4, but the range of what GUIs can do in a map certainly isn't limited to this level of complexity. World GUIs are a way for mod authors and level designers to place interesting and complex puzzles into their levels. <spanclass="anchor"id="line-24"></span><spanclass="anchor"id="bottom"></span></div><pid="pageinfo"class="info"lang="en"dir="ltr">Placing a GUI In a Map (last edited 2005-11-07 19:45:20 by <spantitle="MattVainio @ 67.129.250.254[67.129.250.254]"><aclass="nonexistent"href="./MattVainio.html"title="MattVainio @ 67.129.250.254[67.129.250.254]">MattVainio</a></span>)</p>
<li><ahref="http://moinmoin.wikiwikiweb.de/">MoinMoin Powered</a></li><li><ahref="http://www.python.org/">Python Powered</a></li><li><ahref="http://validator.w3.org/check?uri=referer">Valid HTML 4.01</a></li>