Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Func tracktrain

From HalfLife 2 Knowledge Base

Jump to: navigation, search

Contents

func_tracktrain

Source(core) Solid Entity


description

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

properties

  • First Stop Target target(target_destination)
    The name of the first path_track in the train's path. The train will spawn at this path_track. It will also turn to face direction indicated by the 'Orientation Type' setting.
  • Max Speed (units / second) startspeed(integer) - default: 100
    The maximum speed that this train can move. Any speeds applied to this train, such as by path_tracks or SetSpeed inputs, will be clipped to this maximum value.
  • Initial Speed (units / second) speed(integer) - default: 0
    The speed that the train will move at after it spawns, 0 = stopped.
  • Change Velocity velocitytype(choices) - default: The method through which this train changes its velocity as it moves along the path.
    • 0 - Instantaneously
    • 1 - Linear blend
    • 2 - Ease in/ease out
  • Change angles orientationtype(choices) - default: The method through which this train changes its orientation as it moves along the path.
    1
    • 0 - Never (fixed orientation)
    • 1 - Near path_tracks
    • 2 - Linear blend
    • 3 - Ease in/ease out
  • Distance Between the Wheels wheels(integer) - default: 50
    Used for turning and stopping.
  • Height above track height(integer) - default: 4
    The height above the track that this train moves.
  • Bank Angle on Turns bank(string) - default: 0
  • Damage on Crush dmg(integer) - default: 0
    The amount of damage this train does to entities that block it.
  • Minimum Light Level _minlight(string)
    The minimum level of ambient light that hits this brush.
  • Move Sound MoveSound(sound)
    A sound that is played (and looped) while the train is moving.
  • Move Ping Sound MovePingSound(sound)
    A sound that is played more frequently as the train speeds up.
  • Start Sound StartSound(sound)
    A sound played when the train starts moving.
  • Stop Sound StopSound(sound)
    A sound played when the train stops moving.
  • Volume (10 = loudest) volume(integer) - default: 10
  • Min pitch (1-255, > 100 = higher) MoveSoundMinPitch(integer) - default: 60
    The sound pitch value that the train will approach as it comes to a stop.
  • Max pitch (1-255, > 100 = higher) MoveSoundMaxPitch(integer) - default: 200
    The sound pitch value that the train will approach as it approaches its max speed (or 1000 inches/second if the 'Use max speed for pitch shifting move sound' flag is not set).
  • Min move sound interval MoveSoundMinTime(float) - default: 0
    Minimum interval at which to play the move ping sound.
  • Max move sound interval MoveSoundMaxTime(float) - default: 0
    Maximum interval at which to play the move ping sound.

inputs

  • Kill(void)
    Removes this entity from the world.
  • KillHierarchy(void)
    Removes this entity and all its children from the world.
  • AddOutput(string)
    Adds an entity I/O connection to this entity. Format
  • FireUser1(void)
    Causes this entity's OnUser1 output to be fired.
  • FireUser2(void)
    Causes this entity's OnUser2 output to be fired.
  • FireUser3(void)
    Causes this entity's OnUser3 output to be fired.
  • FireUser4(void)
    Causes this entity's OnUser4 output to be fired.
  • SetParent(string)
    Changes the entity's parent in the movement hierarchy.
  • SetParentAttachment(string)
    Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
  • ClearParent(void)
    Removes this entity from the the movement hierarchy, leaving it free to move independently.
  • DisableShadow(void)
    Turn shadow off.
  • EnableShadow(void)
    Turn shadow on.
  • SetSpeed(float)
    Set the speed of the train, as a ratio of max speed [0, 1]
  • SetSpeedDir(float)
    Set the speed of the train, as a ratio of max speed. Negative values reverse the direction [-1, 1]
  • SetSpeedReal(float)
    Set the speed of the train. Must be a positive value from 0 to max speed.
  • Stop(void)
    Stop the train.
  • StartForward(void)
    Start the train moving forward.
  • StartBackward(void)
    Start the train moving backward.
  • Resume(void)
    Resume the train moving in the current direction after it was stopped via the 'Stop' or 'Toggle' input.
  • Reverse(void)
    Reverse the direction of the train.
  • Toggle(void)
    Toggle the train between start and stop.

spawn flags

  • 1: No Pitch (X-rot) - default: OFF
  • 2: No User Control - default: OFF
  • 8: Passable - default: OFF
  • 16: Fixed Orientation - default: OFF
  • 128: HL1 Train - default: OFF
  • 256: Use max peed for pitch shifting move sound - default: OFF
  • 512: Is unblockable by player - default: OFF



outputs

  • OnUser1(void)
    Fired in response to FireUser1 input.
  • OnUser2(void)
    Fired in response to FireUser2 input.
  • OnUser3(void)
    Fired in response to FireUser3 input.
  • OnUser4(void)
    Fired in response to FireUser4 input.

related tutorials

Personal tools