SiN Elevators by Chronos
|
1. Introduction
|
Everybody new to SiN editing will sooner or later face the problem that there is no way to make elevators without scripting. Back in the Quake and Quake II editing days there was a dedicated entity to do this: the func_plat. But as SiN is a far more advanced game, almost all dedicated moving and rotating entities have been replaced by a single, far more flexible entity: the func_scriptobject. But, this comes at a price. Casual functions like elevators in SiN now have to be made through scripting. The upside is that scripting offers the possibility of including far more features like elevator control buttons that ride up and down along with the elevator for example (and much much more).
The goal of this tutorial is to teach you the basics of making a simple elevator which acts the same way as Quake's func_plat. I tried to make it so that it is accessible to everyone who is interested in making them.
Of course, I'm assuming here that you are familiar with the basics of map editing with SinEd: making brushes, texturing them, using surf inspector and that you at least know how to make a basic room, how to insert entities in it and how to make an entity out of a brush. The tutorial also involves scripting so make sure you have some basic notions of that as well.
And of course, I'm assuming you have SinEd installed and running plus a text editor for your script and menus. Any text editor will do of course but I highly recommend using UltraEdit32 and Uedit wordfile for command coloring. This is really useful to help you avoid typos and for debugging. The example script in this tutorial was colored to look exactly the same way it would look in Uedit32 to give you an idea.
Special thanks go to Tatuone for teaching me how to make an elevator and writing the script file and Eutectic for fixing typos & errors and optimizing the images & page layout.
|
2. Getting started
|
Launch SinEd.
|
Make a basic room 256 x 256 x 256. Give it the texture you like. Don't forget to insert an info_player_start and at least one light entity.
|

Load the generic/misc texture folder and select the generic/misc/red texture. I'll be using it in this tutorial because it contrasts sharply with the walls and floor but you can use any texture you like.
Next, draw a brush 64 long x 128 wide x 8 thick and place it at the bottom of your room so that it's laying on the floor.
|

This is what your brush should look like in the 3D view.
|
Select the elevator brush and RightClick over it. Make it a func_scriptobject entity. Hit N to call up the entity dialog and set the following key/value pair for the scriptobject entity:
targetname: lift1
|
What we have now is the basis for the elevator. But if you compile the map and test it in the game, it won't do anything.
That is because the func_scriptobject can't do anything by itself. It's a script slave entity meaning that it depends entirely script commands to do anything. If you are a bit confused by this, don't worry. It'll all become clear to you when you are done with this tutorial... I hope :)
|
The func_scriptobject entity now has the essential targetname key set to a value of lift1. It absolutely needs that key to be set so you can refer to it in the script by it's targetname preceded by a $ so that will be $lift1 in our case.
Save your map as test.map. I used test.map for this tutorial but you can name it anything you want. Now comes the creative part: writing the script.
First, open your favorite text editor and create a script file named after your map. If your map's name is test.map, the script must be named test.scr.You can create and open the script automatically by clicking on the Open SCR button in the toolbar:
|
Type the following commands or simply select the text directly in this page, copy it and paste it straight into your script file:
// Basic elevator platform script
waitForPlayer
thread lift1
end
lift1:
waitevent:
$lift1 ontouch start_move
pause
start_move:
$lift1 notouch
$lift1 time 2
$lift1 moveUp 128
waitfor $lift1
wait 2
$lift1 moveDown 128
waitfor $lift1
goto waitevent
end
Save your script and your map. Compile your map and copy both test.bsp and test.scr to your game's maps folder. Launch SiN and open your map. Walk onto the elevator.
Congratulations! You just made your first working elevator. :)
|
Some variants:
Of course, you need to set the values for the $lift1 moveUp and $lift1 moveDown commands so that the elevator will stop where you want it to and go back to its old position. I used 128 for the height of displacement in this example, but you should modify the value according to how high up you need it to raise in your map. The values are, of course, in map units.
You can also set the value of the $lift1 time command. This is the time the elevator will take to complete its displacement: the longer the time, the slower it will be of course. You could even have different values for the upgoing and downgoing movements by adding an extra $lift1 time command just before the $lift1 moveDown command.
|
7. Summary
|
This about sums it up for the basic things you need to know to make elevators in SiN. All I did was to show you how to make the simplest possible elevator platform.
I deliberately kept this tutorial short so you could learn to make those elevators in a fast and easy way. Of course there's a lot of other things you can do to make elevators much more detailed and complex, but that's way beyond the scope of this tutorial =)
|