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 LevelEditor help documents, but we'll outline the basic process of placing a GUI into a level here.

For simple puzzle GUIs that run a script, a func_static is bound to a GUI with the "gui" key in the Entity properties in the LevelEditor, with the key being set to the path of the GUI (for more about working with the LevelEditor, see the other help documents on this site).

Some GUIs, such as lift GUIs, require a little more work. We'll use GUIs/movers/strogg/call_lift.gui as an example.

Create a simple box map and place a brush to act as a simple second floor. Place a func_elevator in the map and place its position at the second floor. There are several monitor models to choose from in Quake 4. models/mapobjects/strogg/monitors/medium/med_just_screen.lwo 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.

Select the monitor. In the Entity 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., "func_elevator_3"), and then unselect your elevator and select your monitor. In the monitor's Entity properties, put this name into the "target" key.

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:

        windowDef Desktop
        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."


Since our monitor is on the first floor, enter a new key into the monitor's Entity properties, "gui_parm_floor" and set it to 1. Copy this monitor and paste it at the second floor. Change the value for "gui_parm_floor" from 1 to 2 since this one is on the second floor.

To finish making the elevator functional, select the elevator and make its "gui" entity key set to "guis/movers/strogg/activate_lift.gui". Set three more entity 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.

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.

Placing a GUI In a Map (last edited 2005-11-07 19:45:20 by MattVainio)