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 .. 45 46 47 48 49 50 < 51 > 52 53 54 55 56 57 .. 129 >> Next

5. Select the 90-degree button to apply the correct move direction to the door.
This key and value are then entered for you into the entity’s information as movedir 90. Your entity information should look like Figure 11-19.
While you’re looking at the entity options for doors, look through the other options you could assign to the door. The options are shown in the top list of the Entity tab. You can use the scroll bar to look through the list. All the options are fairly well explained thanks to the programmer notes.
6. Repeat these steps for the next door.
You want to follow the same steps as with the first door, except that you will use a different move direction. Select the door brush. Turn it into a func_door entity. Assign it a movedir of 270.
Figure 11-19:
Slide your door on a given angle based on the button you press within the Entity tab.
Chapter 11: Heading to the Great Outdoors 143
Textllies (ill use) i Entity Class
fun c_ door jrj Create I
Usage Usage Door Is)
orgn 248 32 48 a
movedii 90
E
Key [movedii
Val 190 2<J
135 [T] 45 133 360 225j 27p| 315 Up 11 V Stoc| Curve | Modd. |
Dn| J 0 Skin. | Sound. | | Gii..
Entity (Meda | Textures | Console | Groups j
In Chapter 12, I’ll show you how to pair the doors together. Right now, they open individually, and pairing them will make them work in unison.
That completes one set doors. Now go ahead and apply the same principles to the second set of doors. Remember to assign the correct move direction so that the doors slide into the wall.
Sealing your area
Now that you have turned part of the wall into an entity, you have created a hole in the sealed area of that room. In Chapter 10, you create a portal brush in the hallway to split the map into three areas. This way, only one room would be rendered in the game while the player was in it, and the other room would be ignored. By creating a hole (by way of the doors) in one of the rooms, the area is leaking into the rest of the map and rendering everything again.
Thankfully, the solution to sealing up this hole is simple. By adding a portal brush inside the doors that fits the entire doorway hole, you can effectively redefine the room as its own area and seal it up again. The area will remain sealed until the doors open and will seal again when the doors close.
To create this doorway portal, follow these steps:
1. Select the Nodraw texture and draw a brush that fits snugly into one of your doorways.
2. Texture the inner brush face with the Visportal texture to create a portal brush in your doorway. Then stretch the brush to make it thinner, placing the Visportal textured face inside the doors.
In Figure 11-20, I have removed one of the doors so you can see how it fits inside.
144 Part III: Expanding Your Creation
When creating a portal brush for your door, make sure that the portal side of the brush is inside the door brushes. If they are outside the door brushes, the portal will be created in front of the door, causing a visual error in the game.
3. Create another portal brush for the other set of doors in your map.
Make sure that the portal side of the brush is inside the doors and that the brush creates a tight fit around the doorway.
When completed, save your map again.
Figure 11-20:
Placing a portal brush inside of a func_door creates a sealed area for better optimization.
Lighting from Above
For players to be able to see inside your building, you had to add light entities. Right now, if players go into the outdoor area, they won’t be able to see anything because there is no light. So again, you must add light entities. However, in the case of your outdoor area, instead of just adding a light bulb to the ceiling, your goal is to replicate something that resembles the sun. This is going to require you to fool the player with some tricky entity placement and settings.
To figure out the best placement for your outdoor light entities, you need a brief understanding of how the earth is lit from the sun.
Understanding your real environment
The light coming from the sky might begin its path from the sun as a single beam of light, but by the time it reaches you on the earth, there is a lot more than a single beam at play. Light shines down through atmosphere, which contains all sorts of particles and elements. Although you can’t see it with your naked eye, the light is bouncing off of these particles and shining back to you as if from another source.
Chapter 11: Heading to the Great Outdoors 145
If you ever saw a rainbow after a rain shower, it is a perfect example of how water breaks up light. The sunlight is split up as it passes through the drops of water in the sky. Sometimes it splits like a prism, sending different colors back through the water, but more often it combines again into a white light.
Now, droplets of water in the sky aren’t flat like the mirror in the bathroom. They’re round, which means that light doesn’t just get reflected back in one direction. Rather, it gets reflected in several directions, some light to you and some light to other droplets of water, where the light-splitting effect happens again.
Previous << 1 .. 45 46 47 48 49 50 < 51 > 52 53 54 55 56 57 .. 129 >> Next