looking for a tutorial on how to create a simple elevator
- Broken (this one wasn't added by me) --CrabbyData 08:23, 13 May 2006 (PDT)
BTW, I'm still making 3 tutorials about the elevators (and they look a lot nicer too...), so this one will be gone in a couple of weeks... --CrabbyData 08:23, 13 May 2006 (PDT)
Crabby, by this time you've told us this three times over now, so while it would be terrific if you did write a better article, I now don't believe in you enough to keep this article unchanged anymore. On a further notice, WiseMX told me that he was fine with his tutorials being copied, so that's a relief too. I'm going to clean this article up somewhat now, but it is still going to require some improvements when I'm done. I'd really prefer if you finished your article, Crabby. --Andreasen 21:41, 6 Sep 2006 (PDT)
Just as a tip if someone wants to add it, in a lot of maps tracktrains are very jerky, as you may have noticed. To avoid this, you should never have the player touching the actual tracktrain entity. You should instead parent a func_brush to the func_tracktrain. This can also be used on things like func_rotatings or other moving entities. If this is common knowledge or there is a better way of doing this, I am sorry for wasting your time. DarkD 16:43, 9 Feb 2007 (PST)
Missing example files?
Am I confused here? I dont see the example files that should be included with this tutorial?
- How about: there never had been example files included with this tutorial, which clearly explains how to create an elevator. --Baliame 01:57, 21 Oct 2007 (PDT)
Man this was my tut and i made it suck, sorry. Although its handed down from wismx i need to fix it up.--Gear 14:52, 21 Oct 2007 (PDT)
Another two stop elevator method
After screwing up badly while trying this tutorial, I decompiled a map with a two stop elevator to find out how the map maker did their elevator, and it was actually a bit different.
First you make your elevator floor whatever size and shape you want. After you have done this, measure the distance from the floor of the first level, to the floor of the second level and note this number.
Next you have to turn your elevator floor into a func_movelinear. Give it a name like elevator-floor. Set the move distance of the object to the distance between your floors that you measured in the first steps. Set the speed to about 100.
Create walls and a ceiling for your elevator, group these together and turn them in to a func_brush. Set solidity to always solid and set the parent to elevator-floor.
Make some sort of button, and turn it in to a func_button. Name this button something like elevator-downbutton. In the outputs tab, add an output that is triggered on a button press. Make this output to elevator-floor with the command close.
Make another button just above your last button, turn it into a func_button and name it something like elevator-upbutton. In the outputs tab, add an output that is triggered on a button press. Make this output to elevator-floor with the command open.
On each of the buttons, set the parent to elevator-floor so that they move with the elevator.
That's the basic part of the elevator - a platform that goes between two floors with buttons.
To make the player wait for the elevator to reach each floor before being able to reverse the elevator, run an output from elevator-downbutton to lock elevator-upbutton when it is pressed, and vice versa. After this, add an output from the elevator that triggers on fullyopen which sends unlock to elevator-downbutton and lock to elevator-upbutton. Next add an output from the elevator floor that triggers on fullyclosed which sends unlock to elevator-upbutton and lock to elevator-downbutton
That's protection against changes in direction mid travel done.
As for doors, create a single block across the lower elevator entrance and make it 1 unit thick. Set its material to some sort of shield texture and make it in to a func_brush. Give it a name like elevator_lowerdoor and set its solidity to toggle.
Create an identical block across the upper elevator entrace, but name it elevator-upperdoor.
Next add an onpressed output from each of the buttons in the elevator to each of the doors in the elevator with the command enable. This should make both doors solid while the lift is in transit.
Add an output from elevator-floor to elevator-lowerdoor to trigger on fullyclosed and send the command disable. Add an output from elevator-floor to elevator-upperdoor to trigger on 'fullopen and send the command disable.
Now the doors on each floor should remain closed during transit, but re-open when the elevator is level with them.
This method gives a very smooth and effective two stop elevator system. I've uploaded my testing map which features an elevator constructed using this method at http://beta.toxicantidote.net/files/devtest.vmf --A newbie 18:39, 30 Oct 2007 (PDT)
I'm quite sure I saw some other two-stop elevator tutorials on this wiki who don't need a clean-up. Just something to consider.
Also, I noticed that Valve made a func_elevator entity but I never seen it in use in official maps. For example in Portal 2:
They used a func_tracktrain to make the 'old aperture' tube elevators, so why is that? --Mr. P. Kiwi 09:49, 12 August 2011 (PDT)
- From what I've read, func_elevator only makes two stops: top floor and bottom floor. I've never actually put it to use, though. —Mattshu 09:38, 12 August 2011 (PDT)
- Well I checked some in-game stuff, and surprisingly Valve decided to delete it. It no longer appears in Portal 2, and I guess, future games. Although before that it had multiple 'target' entities to go to. Thanks anyway.