Movers
--------------------------------------------------------------------------------
 
Tomasz 'Millennium' Jachimczak
tomasz@planetunreal.com

Forward:
Since doors and all the other stuff that moves are really the same thing, I will post them as one tutorial. 

Abstract:
I have been asked to post a tutorial about doors, I have also been asked about other movers. They really are the same thing, so I will be posting them as one tutorial. 

Assumptions:
I am assuming that you know how to use UnrealED with a fair amount of practise. I don't expect you to be perfect - otherwise you wouldn't be reading this tutorial :) 

Tutorial:
Introduction:
I will be starting with simple mover (A door I think) and going on to more and more complex things. I would expect that you are quite famailiar with UnrealED to complete this tutorial entirely, but if you just want to know how to make a door move; then this will also help you out. Feel free to stop when I have reached the level that you want to go to... 

The starting point:
You can do this in a level that you have allready created, but I would ask that you spend the time and just start a new one for this tutorial. This way, you will be able to follow my instructions easier - and you will repeat the doors when you go back to your own level, further imprinting it in your mind. 

The room:
Let's make a room that is fairly large. Create a cube 256x1024x1024 and make it look like a room (Textures, Playerstart and lights ect). When the room is complete, make a cube 256x1024x32 and place it in the middle of the room to make two rectangular rooms. This will form the basis of the tutorial. Now in the middle of the wall (At floor level) create a cube 128x128x32 and "subtract" it from the wall. This will be the doorway. 


A simple swinging door:
To make the door move, we have to create a mover; so here are the steps. Firstly create the door with a cube (128x128x16). Make sure however when you are creating the door, that you create it in the MIDDLE of one of the rooms ans in the air (as opposed to in the doorway). When you have made the door, make sure that you are happy with the textures, the texture alignment, scale and the like as there will be no way to change them later. 

When you are happy with the way the door looks, make a brush that is bigger then the door (150x150x100 for example) and place it around the door (make sure that the new brush completely covers the door) and press the "intersect" button. 

If you are not sure at this time, check out my buttons tutorial and come back. When you have intersected the door, move your new brush to the doorway, and place it where you want it to go. Now click the "add mover" button. Move the red brush away from the door (it will only get in the way) and select the mover (Left Click). Once it is highlighted, right click on it (making sure it is the only thing selected) and select "Mover Keyframe --> Key 1". Now rotate the door to an open angle and make sure the hinges are still close to the wall, right click and select "Mover Keyframe --> Key 0" At this point your door should move back to the doorway. You should be ready to try it out now. Rebuild the level and have a go... 



Sliding door:
You will at some time want to have a sliding door, so let's get into it... To build a sliding door is actually easier in a way, then a swinging one. All you have to do is create the door as detailed above (ie NOT in the doorway) and when you are happy with it, intersect it with a larger cube. When you have your new brush, move the brush to where you want the door to slide into (Not in the doorway, but actually in the wall (at this point you probably should lower the grid size. If you haven't done this allready; simply Right Click in one of the 2D views and select "gridsize" and then maybe one or two). Now make sure that the new brush "touches" the wall that the door "attached" to. When placed, subtract the brush. You should now have a hole in to wall just to the side of the doorway. You can change the textures if you like, but if you do it properly, then these textures will never be seen anyway :) Now move the brush to where you want the door (This should be just to the side of where you cut the hole just earlier) and click the "add mover" button. Get the red brush out of the way, then select the mover itself (It has a purple outline) and right click it. Select mover keyframe--> key 1. Now move the door into the hole in the wall and right click it again. This time select mover keyframe--> key 0. Your door should move itself back to where you originally placed it. That is all there is to it. Rebuild the level and try it. 



Automatic doors:
You should notice that the door work quite well, but you actually have to run and "bump" into them to open them. It would be much better if they just opened when you ran "near" them wouldn't it? The first thing you will have to do is add a trigger. To do this, go to the "classes" menu (it's right next to "browse" on the right of the screen) and select "triggers" from the bottom of the list. Expand the section and select "trigger". Place the trigger in the map (Do this by right clicking in the 3D view and select "add trigger here". When you have the trigger where you want it (it should probably be just in front of the door), and select it. 

Now right click and select advanced properties. In the advanced properties, choose "events" and change "event" from none to "firstdoor". When you have done that, click the door again (The mover actually) and right click it. Select "advanced properties" and go to "events". Change the "tag" from none to "firstdoor". Now this is important, go to the "object" section and you should see a entry named "initial state" this is set to "bumpopentimed" by default. Change it to "triggeropentimed". This is important because even if you have a trigger made for the door (or any mover for that matter) it won't be effected by the trigger until you let it be "triggered" (sorry for the pun hehehe :). At this point, you could rebuild and try it out, but before you do that I will make you do one more thing. Left Click on the trigger (to select it) and press CTRL W. This will create another trigger exactly the same as the one that is there (you can duplicate almost anything using this) and place it on the other side of the door. If you didn't do this, you would have a door that only opens from one side - which is fine if you want to "trap" a player in a particular area, but we don't want to do that in the tutorial... Rebuild and have a go. 



Doors with sound:
All this should be pretty cool huh? But our doors need to make all those cool sounds that doors make, right? (If you disagree - then the end of the world will occur and all my work will be in vain. OOPS sorry, I forgot where I was :) Where was I, Yes doors that make sounds. Select the door and bring up the advanced properties. Bring up the "mover sounds" and select "ClosedSound". You should see three little dots in the same cell. Click them and this will bring up the "sounds" menu on the right hand side of the UnrealED window. Click the "load" button below the main sounds toolbar. If you like a ancient or fantasy setting choose "DoorsAnc" or if you like a more futuristic feeling, choose "DoorsMod". You can play a sound before you set it to the mover by clicking the sound in the "sounds toolbar" and pressing "play" at the bottom of the toolbar. When you have found a sound that suits your needs, press the "Use" button which is located next to the three little dots (in the advanced Properties window) and this sound will be set to the door when it closes. Please Repeat the sound for the "opening Sound" and we should be able to have a go and play the level. Rebuild it and let's have some fun. 



Additional Notes:
By this time, you should have noticed that the doors we made are simply made from "movers" not a special piece called "moving door" or something like that. Doors are in no way different to elevators or anything else that moves. By now you should be able t replace the stairs in your level with movers and make the level much more animated. If you would like to know something n particular about doors or how to do something with movers, then contact me at the above address. I think that doors are quite important in a level, so I will go into more (yes that's right, MORE!) depth with doors in a later tutorial, but I think that this will keep most people happy for the timebeing... 
