Author Topic: Elevators  (Read 1147 times)

Nikademis

  • Stingray
  • Posts: 72
Elevators
« on: December 22, 2007, 08:56:18 AM »
Is there a simple tut for elevators or am I just not paying attention to the one posted on here.

Garrett

  • Autococker
  • Posts: 1372
Re: Elevators
« Reply #1 on: December 22, 2007, 09:11:58 AM »
You posted this in the wrong section.  Search elevators in the mapping section and you will find a wealth of tutorials, both expert and beginner.

Chef-Killer

  • Moderator
  • Autococker
  • Posts: 1312

Nikademis

  • Stingray
  • Posts: 72
Re: Elevators
« Reply #3 on: December 25, 2007, 02:11:52 PM »
I did as the followin instructions told me, hence I made this post. The buttons work, but do not take the elevator any where. I have included the screen shot, it is straight path just to show what I did.

you need:

- a func_train entity for the physical elevator platform. we'll call this TRAIN.
- as many path_corners as you have floors, including the ground floor. we'll call these PC1, PC2, PC3, etc...
- a trigger_elevator to make it work like an elevator. we'll call this ELEVATOR.
- as many func_buttons as you have floors (including lift calling buttons). we'll call these B1, B2, B3, etc...

Your path corners need to be aligned so they describe the path that the elevator will take up and down. Place one at each floor so the elevator knows to stop there. Give each one the names above, ie: 'targetname' 'PC1', for each floor you have. Then give them the value of that floor in the key 'pathtarget'. So for the ground floor you might have 'targetname' - 'PC1' and 'pathtarget' - 'stop1'. Increase the numbers by 1 as you go up your floors.

Then create your actual elevator platform and make it a func_train, as above with the 'targetname' of 'TRAIN'. Then, give it a 'target' of the path corner you want it to start at, ie to make it start on the ground floor, give it a 'target' - 'PC1'. This will place your platform at the position of your ground floor path_corner when the map loads.

Now create a trigger_elevator, and give it the keys 'targetname' - 'ELEVATOR' and 'target' - 'TRAIN'. This makes the "machinery" of the elevator target our platform.

Now make your func_buttons. Start out with just making the controls on each floor, ie if you have 2 floors, make one on the groundfloor that makes the elevator go up, and one on the 1st floor that makes it go down. To do this, once you have made the button, give it the key 'target' - 'ELEVATOR' and then a key 'pathtarget' - then the TARGETNAME of the path_corner which you want the platform to go TO. So on the ground floor you'd want 'pathtarget' - 'PC2' and on the 1st floor you'd want 'pathtarget' - 'PC1'.

To make a 'call' button, you'd want to make another button outside the elevator shaft that targets the ELEVATOR just like before, and has a 'pathtarget' of THE SAME FLOORs pathcorner's targetname. So if you wanted to call the elevator to the ground floor which you are on, you'd have a button down there that has 'target' - 'ELEVATOR' and 'pathtarget' - 'PC1'.

That should be it, it's fiddly and there are a load of other keys you will want to use to smarten the presentation up, like proper angles and lips on the buttons, etc... Also, the path_corners will take some experimentation to get into the right places to align the platform with your elevator shaft or whatever.

I hope that's easier to follow than the gamedesign.net explaination, I've basically just paraphrased it as I've recently been playing with elevators myself and it came in real handy.

Krewzer

  • Stingray
  • Posts: 98
Re: Elevators
« Reply #4 on: December 31, 2007, 01:22:11 PM »
It looks like the other 2 path_corners aren't set to target the trigger_elevator.  Look at your pathtarget and targetnames for the path_corners and trigger_elevator.

I'd like to see a side view of the layout, I believe the path_corner needs to be in the lower right corner of the elevator, the path_corner is what determines where the corner of that path is... hence path_corner :)

Anyway here is another link for a trigger_elevator tutorial: http://www.gamedesign.net/node/38