help with (advanced) func_trains Created 17 years ago2006-11-02 04:45:49 UTC by Weiska Weiska

Created 17 years ago2006-11-02 04:45:49 UTC by Weiska Weiska

Posted 17 years ago2006-11-02 04:45:49 UTC Post #201680
2 things:

I want to make an elevator that will have buttons at each floor, where the player can choose whether to go up or down (on a multi story elevator) and a call button at each floor. The extent of my knowledge with elevators would currently only allow me to have an elevator that goes (eg for a 5 story building) up, up, up, up, up, down to floor 1. How can i make it go either way??

Also; would I be able to have 5 buttons in the elevator and when you press the button, it goes to that floor?

The other thing, i have a miniture model of my buildings which goes around on a rail above the reception desk in a semi circle, currently its a func_train with a path_corner at each 'corner' of the arch. Which setting determines its rotation at each waypoint? so it will rotate and be parallel to its track at all times, as currently it just faces the same direction at all points along the path. Alternitivly, would i be able to just have it rotate in circles along its path?

Hard to explain, help if you can please =)
THanks.
Posted 17 years ago2006-11-02 12:38:22 UTC Post #201703
Multi-leveled elevators are quite hard at first. They demand that you'll know how to work with Trigger_changetarget. A very useful entity and here is a tutorial on it. The last one is about making multi-leveled elevators. It is important that you'll read the first two sections, they explain the basic use of the trigger_changetarget and a very important trick that'll help you with anything.

If you have any questions about the tutorial don't hesitate and ask them here. As soon as I'll notice them I'll answer them. I wrote that tutorial so I know how to use that entity. :)

As for the second question. Try using the func_tracktrain entity. It automaticly orienates with the track. It uses path_tracks instead of path_corners.

I was in the middle of writing a tutorial on that subject too, but lately I don't have time for anything, not mapping nor playing in computer games.
Feel free to ask me on that subject... Wait I'll copy a few of the sections of my tutorial, I hope it'll help:

[i]How to use the Func_tracktrain
1) First make the soilds the train is made of. Don't tie it to the tracktrain entity yet
2) Create a brush textured with the origin texture and make sure it's axis is in the place you want the func_tracktrain to rotate around, if you wont do it, the tracktrain will rotate around the map's origin(0,0,0), which would be really nasty.

3) Tie both the origin brush and the solid parts to a Func_tracktrain entity. This is one of the few entities that can have clip brushes tied to it along with the other brushes. This way you can block the player from falling or jumping out of the train in particular places.

We will come back to the train later, but first we got to create it's path.

4) Place a path_track in the place you want the tracktrain to start. The train?s starting location is determined by it?s first path_track not it?s position in hammer or the trains origin. To know where to place it first place the train it self at the starting point then place the path_track exactly in the middle of the train you placed.
5) Give your path_track a name, I named it path1. Copy the path's name in the tracktrain's first stop target value.
6) Place the other path_tracks. If you intend to make 90 degrees or higher curves then you should use more then one segment for the curve, and hence more then one path_track, each one above each end of segment, in order to make the tracktrain turn more nicely and smoothly.

7) Name all the path_tracks. In each path_track write in the next stop target value the name of the next path_track, and in the branch path value write the name of the previous path_track. It is important in case the train drives in the reverse direction.
If the path_track is a dead end and you can't continue onward or go backward don't fill the next stop/ branch path value.

Note: If you want the train to activate something when it passes a certain place use the path_track?s fire on pass or fire on dead end value.

Now we?ll finish with the tracktrain.

8) Apart from the ordinary stuff like giving the train a name there are a few values you should set.
  • Speed- The maximum speed the player can make a controllable train drive.
  • Initial Speed- The speed the train moves when the level starts, if you want it to start not active just set it to 0. This will be overridden by path_tracks? speed value and by the player.
  • Height above track- How high will the train be above the track.(in units)
  • Distance between the wheels- This affects how the train turns around.
  • Bank angle on turns- This value make the train sway aside on turns, really cool affect. The number you type into this value determines the angle it will sway.
The rest is quite self-explanatory. The Sound value determines which sound the train will sound when moving and the volume value determines how loud that sound will be.

9) Now for the flags:
  • No Pitch(X-rot)- ticking this flag make the train rotate only on the z axis(left/right), it will not rotate on the x/y axis.(up/down)
  • No user control- The player can?t control the train if this flag is ticked.
  • Passable- If ticked the train will not be solid.
That is all![/i]
Posted 17 years ago2007-04-09 11:16:34 UTC Post #218496
http://collective.valve-erc.com/index.php?doc=1047964377-43297800

Here's another tutorial on those, it was really helpful even with the not-working pics
Posted 17 years ago2007-04-09 11:38:42 UTC Post #218500
The guy who posted it probebly doesn't even hang around here anymore, no point in bumping this thread. :|
Posted 17 years ago2007-04-09 12:28:33 UTC Post #218507
Why post the Snarkpit tutorial...
Posted 17 years ago2007-04-09 13:00:32 UTC Post #218510
Because it's a good tutorial?

Who gives a shit if it's from the SnarkPit?
Posted 17 years ago2007-04-09 13:03:19 UTC Post #218511
Well simply because he asked for multi leveled elevator, and the TWHL version of my tutorial doesn't have anything on them. :)
Posted 17 years ago2007-04-09 14:13:38 UTC Post #218515
yeah, whoever wrote the TWHL changetarget tutorial was a complete moron ;)
You must be logged in to post a response.