Default
Google


MOVERS - DOORS AND ELEVATORS


"Machismo"
cool_machismo@yahoo.com

INTRODUCTION

This will be a small tutorial that will show you how to make (and make use of) doors and elevators - referred to as movers -in your level and general movers. I will be dealing with it all at one shot - sounds, different triggers, etc.


A SIMPLE DOOR

Making a simple door .......... is well simple. Here are the steps involved:

  1. First make the rooms and the passage where you want to put the door. Lets take my example. First build a room 512x512x512. Next build the passage where you will put the door in the dimensions 256x256x512. Next build another room leading to the passage in the dimensions 512x512x512.

  2. In the Slums.utx in the miscellaneous subsection select the door02 texture. Now build a brush that is 256x256x16 units. Place it in the middle of the connecting room. Now all you need to do is hit the Add Mover Button -. Once that is done move the brush to the right and hit the add mover button again. This is how it should be in the various veiws:

    You will not be able to see the purple mover brush until you move the red builder brush out of the way. I have made the door out of two pieces.

  3. You need to make a place for the door pieces to move into. I you didn't you will see some weird stuff when playing the level. Using the same brush as before just cut a hole in the wall on either sides of the mover. Your top view should look like this:

    Now the pieces have a hole to move into ............... and like they say get mind out of the GUTTER! ;). 

  4. Texture Alignment:- We now need to see that the mover brushes have got their faces aligned properly. To do so you need to first select both movers, right click on them and in the menu go to movers (not mover properties and hit show polys). What happens now is that you will see the mover in the 3d view in all its textured glory:

    As it so happens the face of the mover is not aligned correctly. So just select it go to the texture properties and under the alignment tab hit one of the U-Pan buttons until the texture is aligned correctly. That's all your mover is now perfect (well almost).
    IMPORTANT NOTE: The show polys thing is just temporary and once you rebuild the level the polys are removed from the BSP. But it retains the texture alignment that you would have carried out on it.

  5. KEYFRAME (IMPORTANT): This step is very important. If for some reason your door does not work check that you have done this step. The keyframes thing tells the door to what position it should open to when touched. since we want one part of the mover to move to the left and the other to the right that is exactly what we will do. Select the left mover (in the 3d view) right click and in the menu that pops up hit the Key 1 value (refer picture above). Now drag the mover in the top down view completely into the "hole" that we made for it in step 3. Now right click the mover and hit movers/Key 0(Base) and the mover will move back to its initial position. What happens is when you touch the door it will open, i.e. move to keyframe one and after some time it will close by moving back to key frame 2. Verify that the left mover works by hitting movers/key 1 - it should move to the left and when you hot Key 0 it should move to the right and "close". Do the same for the right door.

  6. That all!. Add in some lights and a player start. Rebuild the level and play it. When you touch the doors it should move to the right and left and after some time it should close.


TRIGGERING A DOOR TO OPEN

You would have noticed above that the doors move very funnily when you bump into them. Bumping doors open can be good for some doors but in this case they are not. You can have the doors open when a player touches a trigger. A trigger works exactly like one of those automatic sensor doors. When the person is within the radius of the sensor (trigger in UED) the door stays open once the person moves out of the range of the trigger the door closes.

First locate and place a trigger from the actor class browser - its located under Triggers/ Trigger (don't expand it just choose a plain trigger). place this actor in between the 2 doors in the 3d view. Now all you need to do is tell the editor the when the player touches this trigger (sensor) the door should open. First go to the triggers properties and expand events and in the event line enter a unique name:

Now go to the two doors (movers) properties and under events in the tag line enter the same unique name that you used above. Now in the top down view they should be connected thus:

Now go to both the movers properties and under Object/Initial state from the menu select trigger open timed. This tells the mover that it has to be opened when the player touches the trigger and not when he bumps into the door like in the previous step.

The final thing you will need to do is to set the collision radius and height of the trigger (think of it as the range of the sensor). First ensure that actors are in radii view in all the views (to do so right on the top of the 2d or 3d views and in the menu that opens scroll down to actors and check radii view, to turn it off check full actor view). The radii view helps to determine the radius of the actor when it is selected by drawing a red circle in the 2d views and by way of a cylinder in the 3d view. Now go to the triggers properties and under collision change collision height and  radius - I set it to 64 and 128 respectively. See below:

NOTE 1:- Various Object/Initial States:

You would have noticed that the mover has many more object initial states here are what they all do (naturally you need to first set up the triggers as described above before making use of these initial states):

  1. Bump Open Timed: When the player touches the mover it opens, remains open for a certain period of time and then closes.

  2. Bump Button: Nobody uses this and probably never will . IGNORE.

  3. Stand Open Timed: All lifts and elevators must be set to stand open timed as the bots wont know how to use the lift otherwise.

  4. TriggerPound: When set to this, on the actor touching the trigger the mover will keep moving between key frame 1 and key frame 0. Great for machinery.

  5. TriggerControl: Actually the trigger control works more like the automatic door sensors stated above. When the player is within the radius of the trigger the door will stay open. Once he moves out it will close.

  6. TriggerToggle: You need to touch the trigger each time that you want to open or close the door.

  7. Trigger Open Timed: When trigger is set off by player opens and after a certain amount of time closes. This is the most common type of initial state that is used.

NOTE 2:- You can have a door open when the player touches a button. To do so make the button and door. Set a unique name under the buttons events/event and give the same to the doors events/tag. Also set the object/initial state of the button to bump open timed and the object/initial state of the door to trigger open timed (note that buster!).


MOVER SOUNDS

The mover sounds very odd without any sounds lets correct that and give the mover some sounds. First go to the movers properties and expand Mover Sounds. Now open the sound browser and load the sound package DoorsMod.uax - as the name suggests it contains all the modern door sounds. Now you need to select a group of sounds that you want to use and is appropriate for the level. The convention for using the door sounds is usually using done like this:

Notice that I have used the mlift7series as they all "match". Here's what they all do: OpeningSound - When it starts opening.
   
OpenedSound - When it has finished opening
ClosingSound - When it starts closing.
 ClosedSound
- When it has finished closing.
                     MoveAmbientSound
- Optional ambient sound when moving.
In most cases the sound with a name end is used for the closed and opened sound, the sound with the name start is used for the closing and opening sound and a looping sound is ALWAYS used as the move ambient sound.


ELEVATORS AND LIFTS

An elevator is a mover brush that goes up whereas the door mover moves from left to right. So its the same when it comes is keyframes. The only difference being that since there are no lift textures you'll have to build the lift separately. To do this first make the area that the mover is going to move in, in your level. What you need to do is subtract a brush off to the side of the level and build your lift in here. After building the lift just intersect it with a larger brush and place it in the area that you made for the lift to move in and hit the add mover button. Remember that if you made part of the mover with an masked decoration like a grate you may need to make an invisible collision hull and intersect it along with the rest. Don't forget to set object/initial state to stand open timed as the bots will not understand anything else. Set the mover keyframes (instead of it moving left the lift just moves from bottom to top and vice versa) and sounds as shown above.

ADDING BOT SUPPORT FOR MOVERS:-

Whereas you need not add bot support for doors, elevators require a special setup if you want them to be used by bots. This seems to be a common question that begginners keep on asking in the forums but its actually very simple. Here are the "5 steps":

  1. The first thing to do is give the elevator a unique name under the movers events/tag (note that u need to set the tag not the events).

  2. The next thing to do is locate something called the lift center. its located under navigation point:

    Now without expanding lift center in the actor browser just select it and place the lift center exactly in the middle of the lift and a little above it. Now go to the lift center's properties and expand lift center. Under that you will find a entry for LiftTag give it the same name as the unique name that you gave the lift in step1.

  3. Oh my god! we're at step 3 what an achievement ....... well never mind the sarcasm ;0. Its time to place two lift exits. This actor tells the bots where to get of the lift at the bottom and where they can get off at the top. Now place the two lift exits in the necessary place. Go to their properties and under LiftExit you will find an entry for LiftTag - set it to the same tag as the mover. In short words you need to set the tag of the lift, and just enter the same under the LiftTag field in both the LiftCenter and the LiftExit.

  4. Now do a rebuild of paths. In the 3d view right click on the tool bar and from the view menu choose show paths and you should see the two lift exits and the lift center connected with a blue line:


MOVER PROPERTIES/MOVER

If you go to the properties of any mover  brush and expand mover you get a set of very interesting options. I will explain a few important ones. If you want to know what the rest of them does, just right click on the mover and hit edit script in the box that opens read the commenst that are written by the Epic Games programmers in green and you should be able to get it. The ones used most often are marked with a * .

  • bDamageTriggered - The mover opens when it takes damage, i.e. when it is hot at.

  • bDynamicLightMover - The mover has the ability to reflect dynamic or changing lights.

  • bTriggerOnceOnly - This mover can be triggered only once after that even on touching the trigger the mover will not be activated. great for one time only puzzles or traps.

  • BumpType - Not used in UT but if you are making maps for the original Unreal1. You can set it to be opened only by the player, or only pawns will be able to open the door or any one can open the door

  • MoverEncroachType - ME_ReturnWhenEncroach: after hitting player returns to previous state; ME_StopWhenEncroach: On hitting player remains at current spot; ME_CrushWhenEncroach: When the mover hits the poor sod of a player it crushes hit to death (see below); ME_IgnoreWhenEncroached; ignores actors/players.

  • EncroachDamage - If you set the above to ME_CrushWhenEncroach set the amount of damage to be inflicted on the player here.

  • MoverGlideType (*)- MoveByTime: If set to this the mover moves at a constant rate from key 0 to 1 and back, GlideByTime: If set to this mover accelerates from key 0 to 1 and back again.

  • NumKeys - This determines the number of keyframes in total. Say for example you had an collapsing plank that goes through 2 different "falling places" - if you wanted the plank to first fall on a ledge below it and then into some water below the ledge this is how to do it. Just set the NumKeys to 3 and hit movers/key 1 and move it to the first place that you want it to fall into - say a ledge below. Now hit key 2, the mover will move back to key 0 - this is normal - from here put the mover into the water. Now on being triggered the plank (mover) should first fall on the ledge and then into the water. 

  • MoveTime (*IMP) - This is the amount of time that it takes for your mover to move from key 0 to key 1 (and then back again). 1 is a perfectly good number, and .75 moves it a bit more slowly. It depends on your level. If you have a door sitting in the thick of the action you wouldnt want it to take forever to open so you would naturally give it a shorter move time.

  • StayOpenTime (*IMP) - This determines how long the mover sits at Key 1, before beginning the journey back to Key 0. 4 gives the player a lot of time to move his ass off the lift or out of range of the door.

What happens is that the door moves from key 0 to 1 taking the amount of time given in move time and then sits at key 1 for the amount of time given in StayOpenTime, it then closes i.e. moves back to key 0 from key 1 by the amount of time given in move time. The way in which it opens is also governed by MoverGlideType i.e. acceleration or smooth time move.


Return to Main Tutorial Index



Acquiring image from ProHosting Banner Exchange