|
This tutorial shows you how to make doors that
are team-specific; i.e., they only allow in members
of one team or the other.
I assume you have a map with a set of functioning
doors. If you don't, click
here for a tutorial on how to make a door. The
map should also have a spawn point for each of the
team types - bluespawn, blueplayer, redspawn,
redplayer - for testing. The 'player points
are where members of that color initially spawn, and
the 'spawn points are for respawning. You might want
an info_deathmatch as well. Here's my sample
map:

The initial map
in q3Radient
|

The initial map
in-game
|
| Note that if
your map looks like the one at right, you
need to press "~", the tilde key,
a.k.a. the top-left button on your keyboard
that isn't the Escape key. This fixes a bug
in Quake 3 where maps under 100k initally
load in fullbright, until you reset the
video display - dropping down the console
does it. Pop the console back up and test at
will. |

The fullbright
bug
|
There are two approaches to creating these doors.
I'll describe both here and their advantages and
disadvantages.

Method One - Correct
Color Opens
Make a trigger (using the texture common/trigger)
that surrounds the foot of your door, as shown. Set
it to trigger_push,
or trigger_multiple
if you prefer (trigger_multiple
is a broader version of trigger_push,
allowing it to trigger multiple events rather than
just one).

The trigger in
diagram view
|

The trigger in
3D view
|
Now make a target_relay.
You can place this anywhere, but I like to put mine
right next to the door and trigger (but right
outside of it). For one, it helps me know what goes
with what, and two, when you connect the entities
(next step) the arrows will be short, instead of
going all over the map. After creating it, open the
entities window (either through the menu or by
pressing <n>)
and check "RED_ONLY" or "BLUE_ONLY,"
depending on whether you want to let red or blue
players through, respectively. 
The target_relay and its entity settings
Now connect the entities; connect the trigger to
the target, and the target to each of the doors; if
the doors have already been "teamed" (as
they should have been if they were functioning
properly) then you will only have to connect the
target to one and the other will automatically be
connected. To connect 2 entities, Click on Select
> Deselect (or just pess <Esc>)(this
assures q3radient nothing is selected at the
beginning of the selection process). Select the
entity sending the event, then the entity receiving
it. Press <Ctrl> +
<K>. If you don't use Select
> Deselect first a bug in q3radient will
usually keep you from connecting the entities. 
The entities properly connected
And voila, bsp-compile and you have a map with a
door that will only open for players of a certain
color. Perfect! Right? As long as you're using human
players.
Unfortunately, the bots only half-understand what
this door does. If a bot of the opposing color has
no significant reason to run through the door, it
won't bother trying. However, if it has something of
"weight" behind it - for example if the
door lies in the way of a weapon, armor, the flag,
an info_camp, or info_botroam, the bot will attempt
to get through the door. When it does, the game
returns a very ugly error in the console.
The cumulative weight of what's behind the door
determines how diligently the bot will attempt to
get through the door. For example, if a bot has the
flag and has determined the path through the door to
be the best route out of the room it's in, it might
try it, then turn back and head the other way. If
the bot needs a weapon and there's a good one right
on the other side, the bot will keep trying to get
in, returning the error every darned time, until
someone kills it or it succeeds and gets in (as
someone of the correct color opens it for them). In
the example below I put a rocket launcher behind the
door and let my alien run loose. 
The alien bot making a mess of the console
So this method gives us exactly what we want,
except the bots don't get it sometimes, and it's
ugly when they don't. So if you're going to run a
human-only Net game for example, this method will
work fine. But if you'll be using bots, you're bound
to get the ugly error eventually. And, if you're
going to submit your map to be rated, the person
rating it probably doesn't know what the bug is or
why it's happening, only that your map is triggering
it and they're not happy. Sometimes you just wanna
kill the buggers when they get stuck against the
door. Thus inspiring Method Two.

Method Two - Wrong Color
Dies
This method starts off with the same map with the
spawn points and the door. It's going to be a little
more complicated, so pay attention.
Create a new set of doors inside of the walls
that the existing doors open into. These doors
should open in the opposite direction of the door
they accompany. So, for example, if you have a top
and bottom door (looking down on the map), and the
top door opens at angle 90, then the new door above
it, in the wall, should open at angle 270. The
easiest way to accomplish this without a lot of work
is to select one existing door, clone it (with the
spacebar), and put it inside the wall of the other
door. Here's a picture of the new door setup: 
The 2 new doors in the walls, waiting to crush
unwanted entrants
Create the trigger and target_relay
just as you did last time, only this time set the target_relay
properties so that it allows through events of the
opposing color - so basically, if you want blue to
die when they try to run through the door, check BLUE_ONLY,
and vice versa. Connect the trigger to the target,
and the target to each of the new doors (not the
original ones), individually. 
The proper entity connections
Now set the properties for the doors that make
them kill. The properties are: angle [towards
doorway], dmg 1000, lip 0, speed 1000, wait -1. 
The door properties
And that's it. As a demonstration...

Here we have our
little alien approaching the door...
|

*POW*
|
This approach is perfect except for 2 very small
things:
-
If you don't set wait to -1, then the doors
can stay shut if multiple members of the
opposing team attempt to enter, and the bug will
occur again.
-
A bug in Quake 3 (or perhaps in the TNT2
drivers) makes the video card attempt to render
the hidden doors if you get far enough away
while in 16-bit color mode. I have a feeling
this nasty-looking effect is a result of the
drivers, not the game however.

The alien bot showing its intellectual prowess again

A sample of the rendering bug. The bug jitters as
you move. Notice that in this color-depth the bridge
also renders incorrectly.

Another sample rendering of the bug. Both of these
images are zoomed-in from far away (distance
triggers the bug).
You can get a great example of a map that uses
the kill doors here.
That's it. Go nuts.
|