This article was converted from a previous version of TWHL and may need to be reviewed
- The formatting may be incorrect due to differences in the WikiCode processing engine, it needs to be revised and reformatted
- Some information may be out of date
- After the article is re-formatted and updated, remove this notice and the Review Required category.
- Some older articles are no longer useful, or they duplicate information from other pages. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.
Brush EntityThis entity allows you to create a player-controllable train / platform etc. that follows a path.
Attributes
- Name (targetname) - Property used to identify entities.
- Render FX (renderfx) - Gives objects special render effects. Think of it as modifying whatever the Render Mode puts out. The options are as follows:
[list]
[li]0 = Normal
- 1 = Slow Pulse
- 2 = Fast Pulse
- 3 = Slow Wide Pulse
- 4 = Fast Wide Pulse
- 5 = Slow Fade Away
- 6 = Fast Fade Away
- 7 = Slow Become Solid
- 8 = Fast Become Solid
- 9 = Slow Strobe
- 10 = Fast Strobe
- 11 = Faster Strobe
- 12 = Slow Flicker
- 13 = Fast Flicker
- 14 = Constant Glow
- 15 = Distort
- 16 = Hologram (Distort and Fade)[/li]
[li]Render Mode (rendermode) - Controls the type of rendering that is used for an object. Options are:
- 0 = Normal
- 1 = Color
- 2 = Texture
- 3 = Glow
- 4 = Solid
- 5 = Additive[/li]
[li]Global Entity Name (globalname) - If your trian is going to cross level transitions, it'll need a global name.[/li]
[li]FX Amount (renderamt)[/li]
[li]FX Color (rendercolor)[/li]
[li]ZHLT Lightflags (zhlt_lightflags)[/li]
[li]Light Origin Target (light_origin)[/li]
[li]First stop Target (target) - The name of the path_track to start at.[/li]
[li]Sound (sounds) - Values:
0 = none
1 = rail 1
2 = rail 2
3 = rail 3
4 = rail 4
5 = rail 6
6 = rail 7[/li]
[li]Distance between the wheels (wheels) - This determines how the train behaves when turning corners. Generally the length of the object works here.[/li]
[li]Height above track (height) - This is the height above the path_track that the train will ride, based on the location of the train's origin brush.[/li]
[li]Initial Speed (startspeed) - The speed the train starts at, until overridden by player control or path_track settings.[/li]
[li]Speed (speed) - The maximum speed the player can make a controllable train go in units/second.[/li]
[li]Damage on crush (dmg) - If train movement is blocked by the player, deal out this much damage.[/li]
[li]Volume (volume) - Range: 0 - 10.[/li]
[li]Bank angle on turns (bank) - This is the angle the train will tilt when cornering.[/li]
[li]Minimum Light Level (_minlight)[/li]
[/list]
Flags
- No pitch(X-rot) (1) - Enabling this will make the train rotate on the Z axis only (yaw - left and right)
- No User Control (2) - Removes the player's ability to control the train (free ride to death?... yeah!)
- Passable (8) - Makes train non-solid.
Notes
- When you create the brush model it must face west (90 degrees - to the left in the top view). When it spawns in the game it will automatically move to the first path_track and orientate itself to face the second path_track.
- func_traincontrol entities allow the player to control the train. They are not part of the func_tracktrain and their placement only determines the area of use. They will automatically stay in that area relative to the train as it moves.
- An origin brush needs to be part of the entity to specify its axes.
- This is one of the few entities that can have 'clip' brushes as part of itself, which prevent player movement (i.e. to stop the player falling off the sides).
I'll make a tutorial on my channel if I figure it out.
[2024-05-12] While I am a proponent of the origin at the back axle, more realistically moving trains, I can see how it is totally incompatible with track [auto]changers. Gotta have to pick your poison, I guess.
[2024-05-13] Also, a tutorial for track trains is needed.
[2024-07-10] You can control a
func_tracktrain
remotely usinggame_counter_set
entities. Value1
throttles up one notch,-1
down a notch.