Basically what this tutorial is going to show you is how to make a moving platform, whether its up and down or across.
func_train, by DarkoneThanks to Darkone for the work put into this tutorial.
Ok now here's the tricky one. Still not too tricky but there is more to it then the others. Basically what this tutorial is going to show you is how to make a moving platform, whether its up and down or across.
Ok lets get to it.
1. First make a brush that is going to represent your platform.
2. now lets add an origin brush in the middle of the brush.
3. Now select both brushes by holding shift and left clicking on them both in the 3d window.
4. While both are highlighted right click your screen and the entity window should drop.
5. Choose func/func_train.
6. Now while your new func_train is made press the N key to open the entity editor.
7. in here there are a few settings you can tweak, for instance dmg,speed,noise, and target
- dmg: how much damage it will cause the player when blocking it. To set this type dmg in the "key" box and 1000 in the "value" box (this setting is based on if you want it to kill the player when touched)
- speed: how fast it will move. "key" speed "value" how fast you want it. 100 default
- noise looping sound to play when the train is in motion. (wav format) add the "key" noise and the "value" of the directory of the sound you want ex: sound/ambient/train.wav you must add the .wav for the sound to work.
- target: this "key" is where your trains starting point. this is explained in the path corner part of this tutorial. but add this now "key" target , "value" p1
- wait: wait will give the func_train a wait state at its stop points "key" wait "value" length of time to wait before proceeding to the next stop point. wait is placed on the path_corner entity.
8. ok now you shouild have your train made and the "target" and the "value" p1 all done, so lets move on.
9. ok now in the middle of your func_train right click the screen to drop the entity window and choose path/path_corner
10. ok now you should have a little boxon your screen. lets take that little box and put it in the center of the train. ...and i mean center.....from all angles.
note: (this is crucial because if its not exactly centered your train will not position itself properly.)
11. ok with the path_corner still chosen and at the middle of your func_train lets hit N key to drop the entity editor. Now lets add these keys and values:
"key" targetname "value" p1
"key" target "value" p2
"wait" .. if you want to have the train pause here for a specified number of seconds.
12. Now....remember when i had you add the "key" target and the "value" p1? what this did was told the train where it will start from when the level begins.
13. ok now lets make another path_corner and put it where you want your train to stop.
note: u can move the func_train in the editor to make sure that the new path_corner is centered. :)
14. ok back to the second path_corner we just made. lets add these keys and values to it:
"key" targetname "value" p2
"key" target "value" p1
15. you should see a line that connected the first path_corner to the second.
16. ok what this just did was tell the first path corner that the second is the next stop. and also told the second one that the first one was its next stop. this will repeat forever, so the train will keep going back and forth.
17. well thats about it for func_train :)
another note: where you add your path_corners dont really matter it can go anywhere you want, and you can add more then one stop.... you can have 10 if you like :)