Skip to main content

env_modeltrain

env_modeltrain icon
Point entityPorted from Featureful

An env_modeltrain moves a model along a path of path_corner entities, the way a func_train moves a brush, and plays one animation while it stands still and another while it moves.

It uses the speed and the wait of each path_corner, fires their targets and obeys their teleport flag, and like a func_train, it starts by itself when it has no name. The middle of the model goes to each path_corner.

Attributes​

The entity also has these common keys:

  • Appearance: Render FX, Render Mode, FX Amount and FX Color
KeyDescriptionDefault
Nametargetname

Triggering the entity starts or stops the train, and Obey Trigger Mode sets how. Without a name, the train starts by itself. See Common keys.

Modelmodel

Sets the model that moves along the path, as a path to an .mdl file.

Model Scalescale

Draws the model this many times its size, so 0.5 is half and 2 is double.

If you leave this key empty, the model has its normal size.

First stop targettarget

Names the first path_corner of the path.

Speedspeed

Sets how fast the train moves, in units per second, until a path_corner sets another speed, and 0 means 100.

Default 64
Obey Trigger Modem_iObeyTriggerMode

Sets how a trigger starts and stops the train.

  • No (0) - Every trigger starts a stopped train or stops a moving one
  • Yes (1) - On starts it, Off stops it and Toggle switches it
Default No (0)
Sound Volumevolume

Sets how loud the move and stop sounds are, up to 1 for full volume.

If you leave this key empty or set 0, it is 0.85.

Default 0.85
Move Soundnoise

Sets the sound that loops while the train moves.

Stop Soundnoise1

Sets the sound the train plays when it stops.

Idle sequenceidle_sequence

Sets the name of the animation the model plays while the train stands still.

If you leave this key empty, it is the first animation of the model.

Custom idle framerateidle_framerate

Sets how fast the idle animation plays: 1 is its own speed and 2 is twice as fast.

If you leave this key empty or set 0, it is 1.

Move sequencemove_sequence

Sets the name of the animation the model plays while the train moves.

Custom move frameratemove_framerate

Sets how fast the move animation plays: 1 is its own speed and 2 is twice as fast.

If you leave this key empty or set 0, it is 1.

Turn Policyturn_policy

Sets how the model turns when it leaves a path_corner.

  • Instant (0) - It turns at once to face the next path_corner
  • Instant, only YAW (1) - It turns at once, but only left or right, toward the next path_corner
  • No turn (2) - It keeps its angles
Default Instant (0)

Flags​

4Initially On

The train starts moving when the map starts

Notes​

  • The train is solid, and it deals 2 crush damage to anything that blocks it, at most twice a second
  • Every animation loops

See also​

Changes since 1.38​

  • env_modeltrain is new in SBO 2.0.0