













 |
Qworkshop3 Tutorials
| func_train
entity |
You may have come across the func_train entity
somewhere in Quake3Arena. This is where a
model or a group of brushes moves, in a
predefined manor, around the level. While
probably not the hardest entities to create
and use, it is probably one of the more
difficult and lengthy. Ready to begin?
Ok, load up Radiant if you haven't already,
and make yourself a room. Find the texture
that you want to use for your train, which we
will make a simple slab of a brush. After
creating this brush, load up the
"common" texture set and find the
"origin" texture.
Those of you who have edited Quake2 or
Half-Life will probably understand the
function of the origin brush, but for those
that don't I'll explain.
The origin brush is used to determine the
center of the brush that it is attached to.
This gives designers a great deal of freedom,
such as deciding which part of a brush the
rest will rotate around, or where the
func_train will stop at the path_corners.
But back to the tutorial. Create a small box
using the origin texture, and place it in the
exact center of the slab that will be your
func_train.
Once you have both your slab and your origin
brush, select them both and turn them into a
func_train as you normally would any other
brush.
This binds them together, so you should be
sure you're done working with your train
before you do this in future versions. But for
now, since all you have is a slab and an
origin brush, don't worry about that. Edit the
func_train, and give it a key of target and a
value of corner1.
Deselect your train, and create a path_corner.
Press n to edit this, and give it a targetname
of corner1, and a target of corner2. (Note!
Your func_train will start at its target when
the level begins, so it doesn't matter too
much where you place your train as long as its
inside the level).
When you are done, close the edit box,
deselect corner1, and create another
path_corner somewhere else. Give this a
targetname of corner2, and a target of
corner3. Repeat that last step, with a
targetname of corner3 and a target of corner1.
Wait! I'm giving it a target of the first
path_corner! Why am I doing this? If you
guessed that this would place the train in a
loop, you are correct. It will go
corner1->corner2->corner3->corner1->etc.
Are you done yet? Not quite. If you compiled
now, the train would just sit there. Load up
your func_train, and click on the START_ON
flag.
This will cause your train to be moving when
you enter the level. Your train should now be
complete, albiet a bit simple. Save your level
and bsp it, then test it. If you did this all
right, you should get a slab of the texture
you picked going in an endless triangle. It
doesn't have to be a triangle, though.
More in part 2.

Ok, having
completed Part 1, you should have a slab going
in an endless triangular loop. But this is no
fun, is it? No, I didn't think so. So where do
we go from now?
Load your level, and select corner1. Add a
wait key with a value of 1, and a speed key
with a value of 50.
Now select corner2, give it a wait key of 1,
and a speed key of 200. select corner3, and
give it wait key of 1.
No speed key? This is because if none is
specified it defaults to the train's default
speed, which we haven't set and there for
defaults to 100, which is exactly what we
want.
So now we don't
just have a boring repetitive triangle, we
have a repetitive triangle that changes speed
at each vertex, and waits there for 1 second
before proceeding. Nifty eh? No? Didn't think
so either :)
A train that goes around in a triangle is
kinda boring, especially if its just a slab.
So what do we do?
Well, not a lot given Q3's rather spartan
amount of abilities with the func_train
compared to such engines as Half-Life's
modified Q1 engine.
BUT, we can change the train itself. I'm not
going to tell you how to do this, but have fun
and make a train out of a few brushes if you
want, you just can't use curved textures (BOO
HISS id BOO!!!)
Well, now you have a fancy looking train
running around in a triangle.
What else can you do? You can add other
path_corners, by adding them onto the end or
inserting them in the middle. Then you have a
fancy looking train that runs around the room
at places you point to, which isn't really
that bad anymore. Add some stuff like
see-through textures, and you could have
yourself a nifty little addition to your
level. Anything else?
Well, (for the third time well, fourth now)
not really. The best that you can hope for is
to make make it into some sort of trap, or
make it a nice piece of scenery with stuff
like doors opening for it to go through (as
long as the user can't block it and interfere
with the timing). That's about all I can think
of for the func_train. If you don't
understand, too bad. If you still don't
understand, d/l my little map I made for this
and check it out. And if you still can't
figure it out, use the forums, don't mail me.
I'm not tech support. Lard would be more
interested ;)
- Volmarias@Home.com
.MAP
File
|
|

|
|
|