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 .. 92 93 94 95 96 97 < 98 > 99 100 101 102 103 104 .. 129 >> Next

4. Adjust the image size and position until it fills that left corner and looks good to you.
I explain how to adjust size and position in the earlier section, “Making children.”
5. When the left side is done, duplicate this layer for the right side of your GUI.
Right-click the left_edge layer from within the Navigator window and choose Duplicate. Open the Item Properties dialog box for this layer by double-clicking it in the Navigator window, and then click the General tab and rename the layer to right_edge. Click the Image tab and change the X Scale to -1. Then press OK to apply the changes to the layer. Drag the layer over to the other side of the GUI window. You should have what looks like Figure 16-20.
You have one more image to add before you move on, and that’s something to fill the space at the top of the window.
6. Right-click the Desktop layer in the Navigator window and choose NewOwindowDef.
7. Open this new layer’s Item Properties dialog box and, on the General tab, rename it to center_image. On the Image tab, enter gfx/guis/ common/strogg/decal in the Material field. Change the Matcolor to a lighter shade of blue to make it stand out a little more. Click OK to apply the changes.
Chapter 16: Gaming with GUIs 303
Figure 16-20:
A symmetrical layout: What you apply to one side of your GUI should be applied to the other.
8. Adjust the size and location so that it sits in the middle of that empty space at the top of the GUI.
You should end up with something that looks like Figure 16-21.
Figure 16-21:
You can apply different colors or any other elements you want to the same GUI
304 Part IV: Going Beyond the Basics
Quake 4 developers often place an image layer that encompasses the entire GUI and makes the edges appear as if they fade out to blackness as these images reach the end of the screen. This is done by adding another image. I think it really adds to the look of the GUI.
9. Add a new windowDef to the Desktop and open the properties dialog box for the new layer. On the General tab, change the name to edge_fade, and on the Image tab, enter gfx/guis/common/ monitor_darkedge2 in the Material field. Change the Matcolor to black and click OK to apply the changes.
10. With the new layer in place, resize it to cover the entire GUI. The layer should be sized to 640,480.
I cover sizing in the earlier section, “Making children.” You should end up with something that’s a subtle yet important change to your GUI, as shown in Figure 16-22. For the Quake 4 theme, this effect of fading at the edges makes the GUIs look old and unclean. You could expand on this theme by adding a layer with scratches, dirt, or splattered fluids.
Figure 16-22:
Apply a faded-edge image to make your GUI look dirty or worn.
Typing text
Your GUI is almost complete. In the middle of the black circle is a space where you can place text to indicate the purpose of this interface. Here’s how you add text:
Figure 16-23:
You can apply not only images, but also text to your GUI.
Chapter 16: Gaming with GUIs 305
1. Right-click the Desktop layer and choose NewOwindowDef to add a new layer.
2. Double-click the new layer, and on the General tab, rename it to text_window.
3. Click the Text tab. Select the Text check box, and then add the following line of text:
Activate\nDoors
Between the two words, I added \n. This is how you add a new line, and it results in a line break between the two words.
4. Click the Image tab and change the Scale to 1.8 and the Alignment to Center. Then press OK to apply the changes.
Your GUI should now look like Figure 16-23.
Activate □□□rs
Acting on buttons
Your GUI might look complete, but it’s missing one important function. You haven’t added any player interactivity to the GUI. The GUI would be finished if all you wanted to do was to create some nice eye candy. However, what you’re trying to build is something the player can use to open the doors. This requires that you add a button to the GUI.
306 Part IV: Going Beyond the Basics_____________________________________________________________
1. Right-click the Desktop layer and choose NewOwindowDef to add a new layer.
2. Double-click the new layer, and on the General tab, rename it button, and then click OK to close the Item Properties dialog box.
3. Move the new layer and resize it to cover the black circle in the middle of the GUI, as I have done in Figure 16-24.
This is what the player has to click to activate the doors.
Figure 16-24:
Create interactive areas of your GUI.
Activate Doors
4. Now add some action to your GUI through the addition of a script. Right-click the button layer and choose Scripts from the pop-up menu.
A script window opens, as shown in Figure 16-25.
5. Type in the following code:
onAction
{
set "cmd" "play guisound_beep2"; set "cmd" "activate";
}
6. After entering this script code into the window, press the window’s Close button at the top-right corner.
Now the button layer has a little icon on the right side that looks like a black circle with a squiggle, as shown in Figure 16-26.
Previous << 1 .. 92 93 94 95 96 97 < 98 > 99 100 101 102 103 104 .. 129 >> Next