Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Quake 4 mods for dummies - Guilfoyle E.

Guilfoyle E. Quake 4 mods for dummies - Wiley publishing , 2006. - 411 p.
ISBN-13: 978-0-470-03746-1
Download (direct link): quake4modsfordumm2006.pdf
Previous << 1 .. 89 90 91 92 93 94 < 95 > 96 97 98 99 100 101 .. 129 >> Next

4. Press the Gui button now to launch the GUI selection window.
Chapter 16: Gaming with GUIs 289
Figure 16-4:
To select and apply a GUI to your entity, click the Gui button in the Entity tab.
Figure 16-5:
You can browse and preview GUIs just like you can with models.
Textllies (All)
Entity Class
func_s»atc 7] Cieate |
Usage Usage * A bush modd lhal Mst sits there, dang nothing. Can be used (or conditional walls and models v
classname func_static A
name func static 40
model (unc static 40
Key |
Val f~~ d<J
Upj 3 Play | Stop[ Curve | Model. |
Dn| _|-------------------------- ^ Sion- | ^Saind^J
____________| Gui..
Entity I Media | Textures j Console | Groups |
The GUI selection dialog box looks a lot like the model select window, discussed in Chapter 12. It contains folders that better sort the different GUIs that are available. It also has a preview window on the bottom left and a comments window on the bottom-right, as shown in Figure 16-5. Feel free to explore the different GUIs that are available before continuing.
290 Part IV: Going Beyond the Basics
Many of the GUIs have comments available. These comments are meant to assist you in applying special settings that are unique to each GUI.
The settings can be applied within the entity’s properties as a Val and Key or through scripting by using the entity.setGuiParm( "Key", "Val" ) script command.
5. For your door GUI, open the folder base/guis/common/strogg.
Here you can find open.gui, a simple GUI that will work perfectly for your door. Select it and take a look at the preview of it, as shown in Figure 16-6.
6. With your GUI interface selected, press OK to proceed.
The open.gui GUI is simple in that when the player uses it, it triggers whatever you have targeted. Then it’s ready to run again just like a trigger-multiple brush. Some GUIs can be used only once or need additional commands to be reset.
Controlling your doors
Your GUI is set for the game, but it doesn’t do much other than look pretty. You still need to tell your GUI to control the doors. Follow these steps:
Chapter 16: Gaming with GUIs 291
1. Press Esc to deselect everything, select your GUI entity first, select one of your door entities second, and then press Ctrl+K.
This targets your GUI to your doors in the order you selected. This targeting will be made apparent by a blue line that extends from the GUI’s point of origin to the door’s point of origin, as shown in Figure 16-7.
You don’t have to select both of the two doors for targeting. In Chapter 12, you used an entity Key and Val to team the doors together so that they acted in unison. So, you need to target only one of the doors to open on command, and then the other door, because it’s on the same team, will open with it.
You must do one more thing before the doors are complete. Right now, if you walk up to the doors, they open automatically. You don’t want the doors to open automatically when you have an interface on the wall to perform this same function. You need to tell the doors not to open unless they have been triggered to do so.
Figure 16-7:
When the GUI entity is ready, remember to target your doors with it.
Blue line
292 Part IV: Going Beyond the Basics
2. Press Esc to deselect everything and then select the two doors.
The command you’re going to apply has to be applied to both doors, and you can apply the same command to all the selected entities at one time. If you look through the options available for this entity as presented in the scrollable field of the Entity tab, one of the listed options is no_touch. The description states, “the door should not be triggered by the player touching it, only by another trigger. In multiplayer, this door can’t be shot to open.” This is exactly what you want because the GUI is to trigger the doors to open.
3. On the Entity tab, enter no_touch in the Key field and 1 in the Val field, as I have done in Figure 16-8. Then press Enter to apply the changes.
Figure 16-8:
Your doors are now controlled with a trigger and won’t open automatically.
Textures (alt) EnMy Oces
18o| 360|
225| 27p| 31S|
Up)
func_doot 7] Create
no J ouch the door should not be triggered by the * player touching it, only by another trigger, in multiplayer, thrs door can't be shot to open. v
team doorsjed A
no touch 1
-
sey |no_touch
Val |1 XJ
^ I Play I Stop I Curve.. I Model.. |
J.
J.
Entity ! Media j Textures j Console |
Groups I
Now you can save your map, compile it, and test it in the game. The result will be a great-looking GUI to the side of the doors that the player can use to open the doors. It will look something like Figure 16-9 in the game.
Working on your own
While play-testing your map, you might notice some things that still need to be done. Depending on how you plan on using this map, you might need more interactivity with the doors. For instance, when the player gets outside of the room, how should he or she be able to get back in? Some options that you have:
Previous << 1 .. 89 90 91 92 93 94 < 95 > 96 97 98 99 100 101 .. 129 >> Next