Author Topic: Elevators for idiots  (Read 6205 times)

Fullmetal_Steeb

  • 68 Carbine
  • Posts: 353
Elevators for idiots
« on: September 25, 2007, 05:55:19 PM »
The Entity list thing is pretty confusing on how to make elevators (Not func_plat's, elevators), so can some one give a really easy explanation?

DrRickDaglessMD

  • 68 Carbine
  • Posts: 376
Re: Elevators for idiots
« Reply #1 on: September 25, 2007, 06:24:51 PM »
Ill try.

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.

Good luck!

Dr Rick Dagless M.D

p.s. You have no idea how many times I had to delete the word 'Lift' and replace it with 'Elevator'. darn yanks! ;)

Eiii

  • Autococker
  • Posts: 4595
Re: Elevators for idiots
« Reply #2 on: September 25, 2007, 09:01:37 PM »
I made a sample map (with source) that showed a working, three-story elevator- I can't find it at the moment, though. It's somewhere on the forums.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Elevators for idiots
« Reply #3 on: September 26, 2007, 04:56:59 PM »
I made a sample map (with source) that showed a working, three-story elevator- I can't find it at the moment, though. It's somewhere on the forums.
It's called __test or _test I think, since it got into my thumbnails pack. :P

QueeNiE

  • 68 Carbine
  • Posts: 435
Re: Elevators for idiots
« Reply #4 on: September 26, 2007, 07:01:02 PM »
Doors work too.


Just really bumpy when moving up. :-\

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Elevators for idiots
« Reply #5 on: September 26, 2007, 08:31:39 PM »
Doors work too.


Just really bumpy when moving up. :-\

Unless it's a slow-butt elevator? =/

Fullmetal_Steeb

  • 68 Carbine
  • Posts: 353
Re: Elevators for idiots
« Reply #6 on: September 27, 2007, 04:10:58 PM »
k, i did all that, but it isnt working. A couple of the buttons move when you stand next to them, but the elevator doesnt do anything. what did I do wrong now?

Edit: Ok, I've got it working so that it goes to the top floor, but it won't go back to the bottom floor if you press the top button (you have to go all the way back down some stairs to press the "call" button to get it to come back down). I'm working on it now.

ANOTHER Edit: I've got it working both ways now. I have a question though. Why is the animation choppy when you go up on it, but smooth when you go down? Is there a way to fix it? Also, how do you add doors that will open when the elevator is at the floor?

DrRickDaglessMD

  • 68 Carbine
  • Posts: 376
Re: Elevators for idiots
« Reply #7 on: September 27, 2007, 04:38:06 PM »
Im not sure why it is choppy, its strange. I think it's linked to the speed of the platform (you can change this with the keys 'speed' - *value* on the func_train.)

As for the doors, I can't think of a way off the top of my head, i imagine it would be quite complex. Something to do with triggering a timer with a wait value of the amount of time it takes to get from one floor to another maybe? I don't really know, I'd probably have to fiddle for a while, if it even is possible.

- Dagless M.D

Eiii

  • Autococker
  • Posts: 4595
Re: Elevators for idiots
« Reply #8 on: September 27, 2007, 07:02:55 PM »
I believe that doors that open and close with the elevator's arrival or departure are impossible.

DrRickDaglessMD

  • 68 Carbine
  • Posts: 376
Re: Elevators for idiots
« Reply #9 on: September 27, 2007, 07:17:43 PM »
yeah, I think you're right, me and Reed have been thinking about it, and we can't think of a way.

I suppose you could put door entities on the entrances to the lift/elevator shafts, so when you went near them they would open, but you wouldnt be able to stop people falling down the shaft, presumably to their doom!

- Dagless

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Elevators for idiots
« Reply #10 on: September 28, 2007, 10:26:29 AM »
You can stop them from falling if you... well, it's to be best explained by a picture:



The whole red thing is the elevator itself, and it moves.

And it doesn't have to be a huge block. It can be a thin block that is just enough to cover the door entrances.

QueeNiE

  • 68 Carbine
  • Posts: 435
Re: Elevators for idiots
« Reply #11 on: September 28, 2007, 11:32:57 AM »
I meant a door would work for just a floor to floor elevator like in pbcup_renoir. :P

Fullmetal_Steeb

  • 68 Carbine
  • Posts: 353
Re: Elevators for idiots
« Reply #12 on: September 28, 2007, 08:44:10 PM »
You can stop them from falling if you... well, it's to be best explained by a picture:
The whole red thing is the elevator itself, and it moves.
And it doesn't have to be a huge block. It can be a thin block that is just enough to cover the door entrances.

darn... how could I have not thought of that? Awesome! The only thing is, it has to be two parts, because you need a part to block the doors on the floors ABOVE where the "elevator" is. But really great idea! Thnx.

Rook

  • PGP
  • Posts: 31
Re: Elevators for idiots
« Reply #13 on: January 01, 2008, 09:09:32 AM »
I didnĀ“t understand it. Can any good man send me a .mapfile with those working elevators, buttons and path_corners ?

Rook

  • PGP
  • Posts: 31
Re: Elevators for idiots
« Reply #14 on: January 01, 2008, 09:14:42 AM »
I forgot... my e-mail is "kosvanec.p@seznam.cz"

Krewzer

  • Stingray
  • Posts: 98
Re: Elevators for idiots
« Reply #15 on: January 01, 2008, 08:01:08 PM »
I would recommend using the lift instead of the elevator unless you actually need the elevator.  It's MUCH simplier to use. I do however like to see people being so creative. It'll be interesting to see the maps that get made.
The reason the elevator is smoother going down is because you are basically falling as you go. When you go up the elevator has to push you up which is done by only a certain amount at time... or something like that. This has been talked about before.
Anyway, I look forward to seeing some new unique maps.

Chef-Killer

  • Moderator
  • Autococker
  • Posts: 1312
Re: Elevators for idiots
« Reply #16 on: January 04, 2013, 07:15:06 AM »
Here's the old example .map file:
ftp://otb-server.de/pub/Maps/map/_advelevator.map

Rockyar_96

  • 68 Carbine
  • Posts: 370
Re: Elevators for idiots
« Reply #17 on: January 04, 2013, 02:39:09 PM »
maybe there should be a subforum for tutorials like this  ;) .

BASEBALLDUDE

  • Autococker
  • Posts: 703
Re: Elevators for idiots
« Reply #18 on: January 06, 2013, 10:25:01 AM »
I know from experience how to make an elevator:

Make your elevator a func_train entity and include "target"-"t1" and "speed"-"[between 1 and 1000]

Make path_corners at each floor. These will be your "floors". Give the first one "targetname"-"t1"  "target"-"t2" "pathtarget"-"d1" "wait 5". Give the next one "targetname"-"t2"  "target"-"t3" "pathtarget"-"d2". And so on. When you get to the top floor, make your "target" "t1".

Now make the doors. Position them in the "closed" position. Make these entities func_door entities. Give the first ones "targetname"-"d1" "wait"-"4.8". Give the next ones "targetname" "d2" "wait"-"4.8" and so on. Also, give your doors "angle" keys and give a value between 0 and 360. Make sure to give your doors opposite angles. For example, if your right doors have "angle"-"90", then all the left doors must have "angle"-"270".The angles determine which direction the doors will open. You won't have to use values other than 0, 90, 180, and 270.

Be aware that it takes some trial-and-error to get your path_corners in the correct spot and your func_doors the correct angle so they open correctly.