env_spritetrain

XashXT

env_spritetrain

A sprite or model that travels on a path whose corner points are set using path_corner. This is a counterpart of the entity from Opposing Force.

Spawnflag

SF_SPRITE_STARTON 1 (initially turned on and in motion)

Options

target Name of the first path_corner that the sprite snaps to when activated.
framerate Sprite animation framerate.
speed Speed of movement until the next path_corner (path_corner can irreversibly change the sprite's speed).

Usage Details

  • The entity respects all path_corner settings, as a real func_train does. When the sprite reaches a path_corner that has a non-zero delay value or has the SF_WAIT_FOR_RETRIGGER spawnflag set, the entity stops moving accordingly but keeps animating the sprite.
  • Deactivation stops the motion and hides the model.