Moving Decorations (Spaceships, Cars, etc.)
If you"ve ever played one of my maps, then you probably already
know what this tutorial is about. For those of you who haven"t, this
will show you how to make an effect similar to the cars and
spaceships in the UT cityintro map. In this tutorial, however, our
ship will fly around a large circular path. Only part of the
circumference of that circle will pass over our map. This will make
it so the ship will fly over every thirty seconds to about every
five minutes, depending on the ship speed and radius of the
circle.
The first step is to decide where you want your ship
to fly. Outdoor areas are good, obviously. Create a large subtracted
cube above your level where the sky is. Create a skybox and set the
edges of your cube to "Fake Backdrop." Make sure the lower edges of
the cube can"t be seen, or else you ship will suddenly disappear
whenever it reaches the edge of the cube. We want it to be concealed
from view before it disappears into the area outside the
level.
Now, set your red builder brush to "Cube" and move it
someplace outside your level. In Ued 2.0, right click on the mover
button and select "Attach Mover." An attach mover is just like a
regular mover, except that you can set actors to be attached to the
mover, and move with it as it moves or rotates. This attach mover
will be the center of the circular path of which our ship
flies.
Under the properties of your attach mover, expand
"Movement" and set the "yaw" of the "Rotation Rate" to about 500.
This will make our mover slowly spin like a merry-go-round. Expand
"AttachMover" from the main tree and set "Attach Tag" to
"Ship".
Now let"s add ourselves a spaceship. Expand
decoration from the actor tree in the class viewer. Now expand
"UT_Decoration" from that menu. about one fourth of the way down,
you will see actors with the names of "fighter1" and "fighter2".
These are the ships you commonly see in Unreal. Add one of these
somewhere along where you want it to fly. The distance between your
ship and the attachmover will be the radius of your circle. Under
the ship properties, expand "Events" and set the tag to "Ship". This
will attach our ship to the attachmover. and make it fly around the
circumference as it rotates. I"ve always found that the defualt size
of the ship is too small. Expand the display tree. Under this, set
the drawscale to a number between 1.5 and 3. You can test your level
now if you want. If the ship flies too slow or too fast, change the
rotation rate of the attachmover or move it further or closer to the
ship.
A ship flying through the sky is awful perdy, but lets
add some more frills to our design. How about some engine flares or
some smoke trails? Somewhere under "UT_Decoration", there is a class
called "UT_Flare". Add one behind each of the ship"s two engines.
Open "city.utx" in the texture browser. Select the texture called
"carflare". In the display properties, beside "sprite" and "skin",
click "use" to apply the carflare texture to your engine flares.
Under the advanced properties make sure "bstatic" and
"bnodelete"
are set to false and "bmovable" is set to true. Set the tag of your
flares to "ship".
Now for our smoketrail. Under efects, there
is a class called smokegenerator. Create one behind each engine of
your fighter. Set their event tags to ship and then expand the
smokegenerator tree. Set the number of puffs to some really large
number (so it doesn"t run out of smoke), and then set the
basepuffsize to about four or so. Set the frequency to about 0.05.
You can always experiment with these variables later. Once again,
under advanced properties, make sure "bstatic" and "bnodelete" are
set to false and "bmovable" is set to true. A smoke generator won"t
work unless you trigger it. Add a timed trigger and set the time to
0.01 or something. Type in "ship" for event, and leave its tag
blank. This should take care of everything, but if you have any
questions please email me or icq me at 46242443.