|
|
Line 3: |
Line 3: |
|
| |
|
| {{note|Unless the ''Fixed Orientation'' flag is set, build your train so that the front of the train is facing down the X axis. (This means that the front of the train is visible in the front view, etc..) When it spawns it will automatically rotate to face the next <code>path_track</code> on the path.}} | | {{note|Unless the ''Fixed Orientation'' flag is set, build your train so that the front of the train is facing down the X axis. (This means that the front of the train is visible in the front view, etc..) When it spawns it will automatically rotate to face the next <code>path_track</code> on the path.}} |
|
| |
| === Individual keyvalues and flags ===
| |
| {{TODO|Since the keyvalues and flags are currently templated to multiple entities, the individual data for this entity is written in this section until all the other entities having these templates has been researched (and found either similar or diverse).}}
| |
|
| |
| *'''orientationtype'''
| |
| :<choices> How/If the train should change its angles as it travels.
| |
| :{| class=standard-table
| |
| ! Literal value || Description || Effect
| |
| |-
| |
| | 0 || Never (fixed orientation) || The orientation of the train is fixed (instead of being relative to the direction of the track) permanently facing the direction it was ''spawned'' in (according to the direction of the first track). This overrides the ''Orientation Type'' settings of its <code>path_track</code>. Does not turn around when reversing direction.
| |
| |-
| |
| | 1 || Near path_tracks || The train changes direction upon nearing a path_track. Does not turn around when reversing direction.
| |
|
| |
| |-
| |
| | 2 || Linear blend || Very weird orientation that is choppy in corners. (Please find a use for it.) Turns around when reversing direction.
| |
| |-
| |
| | 3 || Ease in/ease out || Seemingly the same orientation as ''Linear blend'' (a little less choppy). Turns around when reversing direction.
| |
| |}
| |
|
| |
| * 16 : Fixed Orientation - The orientation of the train is fixed (instead of being relative to the direction of the track) permanently facing the direction it was ''created'' in (prior to spawn). Overrides both the "Change angles" keyvalue setting of this <code>func_tracktrain</code>, and the ''Orientation Type'' settings of its <code>path_tracks</code>.
| |
|
| |
| * 128 : HL1 Train - Set this flag if you want the player to be able to ride on or in a train while it is moving rapidly, or accelerating. Not setting this flag will cause the player to be knocked off the train (and take blocking damage, if set) when he bumps into collision surfaces parented to it.
| |
|
| |
| <!-- dead links
| |
| == See also ==
| |
| * [http://sdknuts.net/akg/tutorials/wiseElevators.asp HL2 Elevators]
| |
| * [http://sdknuts.net/akg/tutorials/wiseLaser.asp Moving Laser]
| |
| * [http://sdknuts.net/akg/tutorials/wiseTrains.asp Player Controllable Trains]
| |
| * [http://sdknuts.net/akg/tutorials/wiseTrains2.asp HL2 Automated Trains]
| |
| * [http://sdknuts.net/akg/tutorials/wiseTrains3.asp HL2 Synchronized Trains]
| |
| * [http://sdknuts.net/akg/tutorials/wiseTrains4.asp HL2 Trains and Complex paths]
| |
| * [http://sdknuts.net/akg/tutorials/wiseAltpath.asp Alternate paths]
| |
| -->
| |
|
| |
|
| {{in code|class=class_c_func_track_train.html CFuncTrackTrain|file=trains_8cpp-source.html trains.cpp}} | | {{in code|class=class_c_func_track_train.html CFuncTrackTrain|file=trains_8cpp-source.html trains.cpp}} |
Template:Base brush It functions as a moving platform that the player can ride. It follows a path of path_track entities.
Tip:Increase the Distance Between the Wheels keyvalue for smoother turns.
Note:Unless the Fixed Orientation flag is set, build your train so that the front of the train is facing down the X axis. (This means that the front of the train is visible in the front view, etc..) When it spawns it will automatically rotate to face the next path_track
on the path.
Template:In code
Keyvalues
Template:KV BaseTrain
Distance between wheels is the distance in Hammer Units between the front axle and rear axle of your train. The rear axle moves the train and stays on the track. The front axle turns as it approaches path_tracks and does not stay on the track.
Flags
Template:Fl BaseTrain
Inputs
Template:I BaseTrain
Backward movement
Due to coding errors or engine limitations, the Reverse and StartBackward may not function correctly if the "New Train Speed" property in the involved path_track entities is set to 0. The train may fail to reverse, jamming in place or moving in the wrong direction. To solve this issue, some or all of the path_tracks
must have their "New Train Speed" variable set to a nonzero value.
Outputs
Template:O BaseTrain