Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Elevator

From HalfLife 2 Knowledge Base

Jump to: navigation, search

by Unsane

How to make an elevator using func_tracktrain.

How to create an Elevator

First create your lift car. For the purpose of this tutorial I created it out of brushes, selected them all and tied it to entity func_tracktrain. Now being a func_tracktrain it will need tracks; so in the map you will end up with something like this:

Image:elevtut01.jpg

You can use any number of path_tracks you want, don't use pathcorners, that was for HL1 and wont work in HL2. In this case I have 3. Now before we go on; let’s get some names on what we have:

  • Liftcar is named: elevator
  • path_tracks are named: lvl01, lvl02, lvl03 from the bottom up.
  • Remember to set next targets too. For lvl03 set next target to lvl01.

Liftcars (func_tracktrain) properties are as follows:

  • Name: duh!
  • Max speed: what you like, I used 25.
  • Initial speed: 0 (so the elevator doesn’t start moving on load)
  • Height above track: I set mine to around 4, the path Entities are aligned with the bottom of the car.

Image:elevtut02.jpg

The rest is default; except for the flags: go in here and tick these 2:

Image:elevtut03.jpg

  • No Pitch (X-rot)
  • No User Control

"What, no user control?" you say "but I want buttons?!" And that you will get, but this is actually a train, right, so user control would mean that it was controllable in the same way as the train in 'On A Rail' in HL1. We don’t want that.

Now the paths. The first one at the bottom, give it a name, and a target and set 'New trainspeed' to '0'. The next one, name, target and set this output:

Image:elevtut04.jpg

Do the same for the last one too.

And here comes the buttons:

Make a func_brush w/ a button texture inside the car and parent it (add the elevator's name in the Parent field of the func_button) to the elevator. Alternatively; you could just make it part of the func_tracktrain, as this is not really a button but just a brush to show where the button is.

  • Note: I did it this way for two reasons; first because in this case I created the car before even thinking about buttons (this is my first elevator), and secondly I can move the button if I want to. In the example map the buttons are on the wall on each floor, but it looks better with them inside the car.

Now, over the func_brush make a nodrawed brush and tie to entity func_button. Place one of these on each floor, where your func_brush button will be. Name them. Go into the first: Flag them:

  • Dont Move
  • Use Activates

Do that for all of them

In the first, set the output:

Image:elevtut05.jpg

In the next, set the output:

Image:elevtut06.jpg

In the last, set the output:

Image:elevtut07.jpg

That’s it! Now you have a very basic elevator that moves when you press the button and stops on each floor. Granted, it is not perfect, but this is my first elevator, and when I've had a look at it, I will post some more on this, ie. more advanced stuff like choosing what floor to go to, call buttons and elevators with useable doors.

Get the example .vmf here:

elevator_test.vmf link is dead, if someone still got the file then I can host it


After reading this tutorial I went crazy and created the more advanced elevator the author had in mind.

Features:

  • Doors
  • Floor-buttons in the elevator
  • Call-buttons on doors
  • Lights

Get the example .vmf here: fnh_elevator.vmf

The map has warnings about too much light modes on surfaces because using lights was the only method I knew to indicate what buttons are activated. There is a better way however. It can be found in the following thread

-- FnH


you say to make a func_brush and "parent" it to the elevator. what do you mean by parent? do you mean just put it along side it? or is there sumthing else i have to do?

-Justin (contact: JustinMs66@hotmail.com)

Add the elevator's name in the Parent field of the func_button. -Anti


Casinos security online. Casino games. Casino rules. casino games game online casino fun casinos diamond club slots Online casino - Internet Casinos casino games game slots






[l_sp_18]


nick lachey ringtone obie trice ringtone garth brooks ringtone big tymers ringtone hotlink caller ringtone memphis bleek ringtone hotlink maxis caller ringtone maxis caller ringtone travis ringtone baby bash ringtone seether ringtone sheryl crow ringtone ginuwine ringtone alicia key ringtone kanye west ringtone reba mcentire ringtone eric clapton ringtone limp bizkit ringtone knot ringtone slip crow ringtone sheryl

Personal tools