Run Radiant and open the map. We're
going to put the destructible gate into some
clear space.
Select grid size 9. Get the 2D view
over the clear space and delete the few bits
of terrain as shown.
Now draw a brush in the space we've made,
make it wall03_mid texture, and make it
Detail. Then select it again, lift it
up so you can see the bottom and caulk the
bottom face (Tip: select the face to be
caulked, then also select a nearby caulked
face - this will bring the caulk texture
into view in the textures window, ready for
your quick selection.)
Then move the brush back down into the
gap, and ensure it neatly fits with no gaps
showing around the sides where the terrain
brushes meet it.
We will put the gate to be destroyed on
this nice flat surface. Import
_temp.map and move the imported selection
onto the middle of the flat slab.
Now to explain what we have here.
Shift+alt+click the trigger brush, and
press N. Close the window and press N
again so we see the tick boxes.
This is an axis_objective because
it is owned by the axis team. It seems
to me that something to be destroyed by the
allies ought to signify an allied objective,
which is exactly why you should use a prefab
as it is easy to tick the wrong boxes when
creating one from scratch.
The targetname and scriptname
are gate_toi, being the name of the
destructible plus "_toi" to
indicate the trigger_objective_info.
This is not a universal naming standard,
it's just one I adopted for myself so I
could easily identify an entity type by the
type of name it had.
The target is the name of the
destructible entity - you can tell if you've
made a naming error because the trigger
brush won't have an arrow line connecting it
to the target brush(es). This line
can't really be seen when the target brush
is inside the trigger, which it normally
would be because the trigger indicates where
the attacker must plant dyna or chuck
the satchel. So to see it, select grid
scale 9 and drag the trigger brush away a
notch.
Now you can see the arrow connecting
line, so the names are ok. Put the
brush back over the gate.
The objflags is set to 4, telling
ET to show a dyna symbol when a player
enters the brush. I haven't seen a
full list of possible values and I don't
remember where I read even the partial list
that told me to use 4 for dyna, but there
will be a different value for different
symbols. The only other one you might
want really is the satchel symbol.
Experiment with powers of 2 (1, 2, 4, 8 etc)
to discover what the symbols are if you need
symbols other than dyna.
The spawnflags is set to 1, which
is a reflection of the tick box settings we
have. The other values are obvious.
Hide the trigger so we can examine the
other components.
Shift+alt+click the middle of the gate until
the whole rectangle is selected (I'm using
grid scale 6 again now).
This is the thing we want to blow
up. Press N.
We have the useshader ticked so
the temporary fragments are textured nicely.
The mass tells ET how chunky to
make the bits that fly away from the
bang. These bits will all disappear
after a short time.
The targetname and scriptname
are "gate", which will be
referenced in the script.
Hide the gate. Now you can see the
remnants that will be permanently shown
after the explosion. They won't be
visible before the explosion because they
will be invisible when the map starts.
You don't have to have remnants, it's up to
you. I include them here so you can
see how they are made if you want them.
Shift+alt+click on a remnant brush and
they will all get selected.
These bits were made by copying the gate
brush (and then right-click and "Move
into Worldspawn" so that the copy
wasn't a desctructible). The copy was
then chopped up with the clipper tool.
Most of the copy was deleted, some of the
bits were left in place, and some scattered
onto nearby ground (with the downward face
caulked of course).
Then all the bits were selected and made
into a func_static which is a way of
making some brushes into an entity so you
can refer to that entity. We will need
an entity name because we will want to make
these bits visible after the explosion.
The start_invis box is
ticked. Makes sense. I gave the
entity a targetname of gate_bits so I
knew what I would be referring to in the
script.
Reveal the hidden brushes, close the Info
window if you have it open, save the map and
compile it. Don't run ET yet.
|