I have set up a simple test map consisting of a slab of BSP, a
skylight, a playerstart, a skydome, and a directional light.
I will only be using default editor assets which can be found
in the EditorMeshes and EditorMaterials
packages.
I will be using Movers/Interpactors (the terms are interchangeable)
that are sometimes animated through Matinee. If you need to
learn Matinee, I would recommend Hourences'
Tutorial on them as a starting point.
I added the default mesh cube as a static mesh to the map, converted
it to an interpactor, and then made it very thin vertically.
The pivot is in the center and I will only animate it up and
down.
*Note: Pivots/Origin points on StaticMeshes serve as the 'hinge
points' for interpactors. If you need to create a door, or other
moveable object that revolves, rotates, or swings on an edge,
you'll need to be aware of the mesh's pivot/origin location.
It is impossible to re-assign this pivot permanantly in the
engine. For mesh placement, you can currently temporarily assign
the pivot to a new location, but when you're done, the pivot
will be back at the origin. If you find a mesh that you want
to use as a swinging door, and its pivot is in the center, you
are out of luck. The origin is determined when the mesh is created
in a 3D Modeling application - not in the Unreal Editor.
Attaching Actors: I will attach some actors
to a lift created in the Lift: Touch
tutorial. This kind of lift raises after a player walks onto
it. I've set up a very simple system.
First, I'll put the lift together. In the level, I have a wall
with an indentation and placed the interpactor at the bottom
of the indentation.
|
|
On the kismet side of things, I created a new 'Mover'
Event based off the interpactor and left the 'StayOpenTime'
at the default of 1.5 seconds.
|
|
Then I tested it. Go in game and test it out. It worked fine
for me.
Now, what do pretty much all lifts need? Some sort of support.
Instead of wires, or a track in the wall, we'll attach another
interpactor to the lift underneath - like a pole. We won't need
to matinee it since we're attaching it. I've duplicated the
lift mesh, shortened it on both sides, and made it tall. Then
I positioned it underneath the lift such that when the lift
is at it's fullest height, the 'pole' streches from the bottom
of the lift to the floor - like it pushed the lift up.
|
|
Now, let's attach the 'pole' to the lift:
1) Select the pole, and open it's properties.
2) Hit the little 'lock' icon in the upper left to lock the properties window to that asset.
3) Select the lift
4) In the properties window tied to the pole, expand the 'attachment' section, click on 'base' and hit the green arrow to tell the pole that its base is the lift.
5) Make sure 'HardAttach' is checked off.
Once it's all set, whenever you select the pole, a green box
will surround whatever that asset it attached to, as shown:
|
|
Let's add an emitter to the system and attach it to the same
lift platform the 'pole' is attached to. We'll pretend it's
steam pushing out as the lift goes up. After adding the emitter,
I attached it to the lift the same way I attached the 'pole'.
I locked the emitter's property window and told it to use the
lift as the base.
Now, say I wanted to attach the emitter to the pole when the
lift was up, and then bring it back down. Well, we can't do
this starting out at the beginning of the map - we have to do
it on the fly in-game. To do this, I'll use an 'Attach' action
and add it to the system. When the lift is at its height, I'll
connect the Open Finished of the Mover event to the Attach to
actor referencing the emitter. Make sure the emitter is at the
location you want it to start at. Once its attached, it will
follow the lift back down.
|
|