Func tracktrain: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(The effect of reversing direction.)
m (removed external links (SDKNuts appears to be dead))
Line 1: Line 1:
{{wrongtitle|title=func_tracktrain}}
{{wrongtitle|title=func_tracktrain}}


==Entity Description==
== Entity description ==
A [[brush entity]] that functions as moving platform that the player can ride. It follows a path of [[path_track]] entities.
A [[brush entity]] that functions as moving platform that the player can ride. It follows a path of [[path_track]] entities.


{{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 ===
===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). (This writer will not research these entities himself.)}}
{{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). (This writer will not research these entities himself.)}}


Line 20: Line 19:


|-
|-
| 2 || Linear blend || Very wierd orientation that is choppy in corners. (Please find a use for it.) Turns 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''. Turns around when reversing direction.
| 3 || Ease in/ease out || Seemingly the same orientation as ''Linear blend''. Turns around when reversing direction.
Line 27: Line 26:
* 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>.
* 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>.


==Availability==
== Availability ==
{{in game|brush}} {{game-base}}
{{in game|brush}} {{game-base}}
{{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}}


==Keyvalues==
== Keyvalues ==
*{{kv basetrain}}
* {{kv basetrain}}
 
==Flags==
*{{fl basetrain}}
 
==Inputs==
*{{i basetrain}}
 
==Outputs==
*{{o basetrain}}


== Flags ==
* {{fl basetrain}}


==External links==
== Inputs ==
* {{i basetrain}}


The following SDKNuts tutorials all includes the use of func_tracktrain:
== Outputs ==
* [http://www.sdknuts.com/tutorials/wiseTrains.asp Player Controllable Trains]
* {{o basetrain}}
* [http://www.sdknuts.com/tutorials/wiseTrains2.asp HL2 Automated Trains]
* [http://www.sdknuts.com/tutorials/wiseTrains3.asp HL2 Synchronized Trains]
* [http://www.sdknuts.com/tutorials/wiseTrains4.asp HL2 Trains and Complex paths]
* [http://www.sdknuts.com/tutorials/wiseAltpath.asp Alternate Paths]
* [http://www.sdknuts.com/tutorials/wiseElevators.asp HL2 Elevator]
* [http://www.sdknuts.com/tutorials/wiseLaser.asp Moving Laser]


[[Category:Entities]][[Category:Brush Entities]]
[[Category:Entities]][[Category:Brush Entities]]

Revision as of 03:33, 1 October 2007

Template:Wrongtitle

Entity description

A brush entity that functions as moving platform that the player can ride. It follows a path of path_track entities.

Note.pngNote: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.

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). (This writer will not research these entities himself.)
  • orientationtype
<choices> How/If the train should change its angles as it travels.
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 path_track. 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. 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 func_tracktrain, and the Orientation Type settings of its path_tracks.

Availability

Template:In game Template:Game-base Template:In code

Keyvalues

Flags

Inputs

Outputs