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.
Lift Activated by Touch: This kind of lift
raises after a player walks onto it. I've set up a very simple
system.
Let's use the 'Cooking' analogy I outlined in the Applications
introduction to set this up:
1) What are we making?
A Lift that raises/lowers by touch.
2) Gather the ingredients:
Mover (lift)
Mover Event & Matinee
3) Put it together. In the level, I've created 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.
|
|
4) Test it. Go in game and test it out. It worked fine for me.
5) Refine it. First, think about the collison and lighting and
get those fixed. Then consider any potential issues. What happens
if its lowering while the player is underneath it? Well, the
default Mover settings in Kismet take care of this for us. The
Hit Actor Event will change the direction of the lift and send
it back up. Of course, you could change this to kill the player
if you like. However, this is the time to also asign sounds
to the lift. You can either do this through the interpactor's
properties, or add 'PlaySound' actions triggered by events you
add to the matinee.
6) Adjust it for Single/Multiplayer. As you may have read in
the SinglePlayer/Co-op/MultiPlayer
section, there are many considerations to take into account
for whichever system you're setting this up for. The system
as it stands I think would be ok for single-player and multiplayer
both. But if you make any serious changes to it, you should
still ask yourself some questions. What happens if two players
are fighting on, around, or under it? Actually, it looks like
that might be ok.
|