Platforms can move in any direction though defined paths and have rotation.1. Make sure you have created room with light and info_player_start. 2. Make sure you have enough space for platform. 3. func_train ONLY- angular velocity was hidden feature, the Half-Life fgd didn't contains such a keyvalue (until update). It could be set only manually by turning off smart edit mode.
Very Simple Platform
The goal is to create brush(brushes). This brush turned to func_plat will move upward when someone get close to it. After reaching top, it is returning to starting position.
1. Create the elevator/ lift from brushes.
2. Turn the brush into func_plat.
3. Set the keyvalues:
travel altitude--> how many units the platform moves. Can be negative in Toggle mode only. speed--> how fast platform moves in units per second.
move sound--> looped sound playing when platform is moving. stop sound--> single sound playing when platform pause it's movement. 4. Checking the Toggle flag make lift disabled. From now platform must be triggered to enable movement.
Whatever FGD says, travel altitude can't be negative.
Rotating simple platform
The same as simple platform with func_plat functions, but can rotate around axis (brush center with "ORIGIN" texture, same as in the func_door_rotating).
1. Make a brush, place an origin brush when you want platform to have it's axis. Select both brushes (platform and origin) and turn them into func_platrot.
2. Parameters are the same as in the func_plat, except:
spin amount--> how many degrees the platform rotates from it's starting to ending position. speed of rotation--> how fast the platform moves.
3. Checking the Toggle flag make lift disabled. From now platform must be triggered to enable movement.
Train- More Advanced Platform (ADVANCED)
The most common entity used to make elevators/trains/lifts is func_train. It have more options than simple plats, and it moves among configurable path made by path_corner's. Also used as moving target for some entities (e.g. env_laser target).
1. Make a brush, it will be your elevator/train/lift or whatever you want it to be. Turn the whole thing into func_train.
2. Set keyvalues. The most common are:
name--> set some name if you want train to be controlled by triggering it. first stop target--> the first path_corer name where you want your train starts at. We'll set it up later. move sound--> looped sound playing when train is moving. stop sound--> single sound playing when train pause it's movement. speed--> speed of the train. angular velocity--> powerful keyvalue, let you set the train rotation around any of the axis (you can combine multiple axis rotation). Required "ORIGIN" brush included in entity to rotate around.The format is [Y, Z, X] (not x,y,z like it's written here).
The number represents degrees per second. Leave it [0 0 0] have train without rotation. [0 90 0] means the train will rotate for 90 degrees each second it's travels.
damage on crush--> damage done to entity that blocks it.contents--> seems does not work well, can be used only when not solid flag is checked. The options are: -1 - empty -3 - swimmable water -4 - slime -5 - lava -7 - volumetric light
-16 - ladder For example if u take water, the water-like sound will be generated every time player walk into brush, or leave it.
3. There is only one flag you can check:
not solid --> disables collision of the train.
4. Now you have to add a path that your train will travel by. Place path_corner into the map. Move it to location where you want your train have starting position. Remember that this point represents center of the whole func_train. Then Place another path_corner (The second train move target).
5. Place as much path_corners as you want. The train will move among path_corner's one after another. It can loop it's movement, pause train at any point, or change speed on path_corners.
6. Set the keyvalues of path_corners:
name--> set the name of the path. It is required. next stop target--> the name of the next path_corner that train will travel after reaching current destination. fire on arrive--> entity to trigger on arrive at this point. wait here (sec)--> how many seconds the train waiting at this point (before continuing travel). new train speed--> set a new train speed after reaching this point. new train rotation speed--> set a new rotation speed after reaching this point.
7. Set the flags of path_corners:
wait for retrigger--> the train stops it's movement here. Train will continue it's travel when triggered. teleport to this--> immediately teleport to this point instead of moving. fire once--> the fire on arrive will trigger only once. Used when path is reached multiple times but we want to send trigger only once from this point. random targets--> the next destination will be randomly choose from path_corners with the same name.
8. Now we need to connect the path_corners. This graph explains how it works:
This will provide loop movement. Remember to fill first stop target in func_train with path_corner name. Path can be placed on different heights, in every location. Location of the func_train does not matter, because on map start train will be placed at the first path_corner center. Don't forget to configure corners according to needs. If you set the name of func_train it will start inactive, train will need to be activated through trigger.
|
|