func_train

From Sven Co-op
Jump to navigation Jump to search
func_train
Type

brush

Status

supported

 


The func_train can move along a path made from path_corner entities. It is a more feature-rich movable object as func_door is. It can serves as env_laser/env_beam target, trigger_camera target and just as a elevator or... train!

1 Keyvalues

Classification : classify

Classification of this train. If specified, enemies of this class will attack this train.

First stop target : target

The name of the first path_corner (where the train starts). Train is teleported to this position on map start, no matter where

it's placed.

Move Sound : movesnd

Sound that is played while the train is moving.

Move Sound Loops? : movesnd_loop

Sets if Move Sound should be looped during brush movement until it stops.

Stop Sound : stopsnd

Sound which is played once as the train stops moving.

Speed : speed

Movement-speed in units per second.

Angular Velocity (X Y Z) : avelocity

Axial rotation each second. Fist value rotates brush around Y axis, second around Z axis, and the last one rotates brush around X axis. E. g. '0 180 0' makes train rotates 180 degrees around Z (height) axis, counter clockwise each second.

Damage on crush : dmg

Axial rotation each second. Fist value rotates brush around Y axis, second around Z axis, and the last one rotates brush around X axis. E. g. '0 180 0' makes train rotates 180 degrees around Z (height) axis, counter clockwise each second.

Contents : skin

It's used to change the 'contents' of this brush (e.g. water makes it behave as water when entities going though it).

You don't really need to use this.

Sound Volume : volume

Self-explanatory.

Obey Trigger Mode : m_iObeyTriggerMode

Originally, func_train would not interpret use-types "Off" and "On" as "Toggle". This keyvalue allows you to use "On" to proceed the train and "Off" to stop it.

Sound Replacement File : soundlist

Allows you to setup a sound replacement file for the func_tracktrain sounds. The path begins in 'svencoop/sound/mapname', whereas 'mapname' would be your map's name. You can go to the parent directory using '../'. A valid sound replacement file contains one or more lines with two sound-paths, which are separated by a space and wrapped into quotes. The first sound is the sound to be replaced. The second sound is the new sound. Sound-paths start in the sound directory. You cannot go to the parent directory using '../' in that case. These sounds do not need to be precached using a custom_precache point entity.

Move Sound Override : noise

Custom sound file that is playing when entity is moving. Overrides default "Move Sound" sound.

Stop Sound Override : noise1

Custom sound file to play when the entity ends movement. Overrides default "Stop Sound" sound.

2 Flags

8 : Not solid

Train have it's collision off.

3 Notes

Requirements for origin brush are questionable. Some entities like trigger_camera or trigger_setorigin may need it to work properly. Also train can't use "Angular Velocity" when no origin brush provided. You can make train invisible, by setting render mode, when the train is a laser target. If you name your train it will start stopped, waiting to be started by trigger (even if nothing is targetting this entity).

4 Changes

5.0 Steam Release: Added 'Sound Replacement File', 'Move Sound Override', and 'Start Sound Override' keyvalues.