Func train
From Valve Developer Community
Contents |
Entity Description
FGD Code
@SolidClass base(Targetname, Origin, RenderFields) = func_train [ spawnflags(flags) = [ 8 : "Non-solid" : 0 ] texframeindex(integer) : "Initial Brush Frame Index" : : "Use this to set the initial frame of materials with multiple frames in the brush" target(target_destination) : "First path_corner" noise1(sound) : "Movement Sound" : : "The sound to play when the train moves." noise2(sound) : "Stop Sound" : : "The sound to play when the train stops moving." speed(float) : "Speed" : "50.000000" : "Speed at which the brush moves." volume(float) : "Sound volume [0.0, 10.0]" : "0.000000" dmg(float) : "Crush Damage" : "0.000000" input Toggle(void) : "Toggle movement" input Start(void) : "Start movement" input Stop(void) : "Stop movement" input Use(void) : "Toggle movement - has a different functionality than Toggle" ]
Keyvalues
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
Origin:
- Origin
<origin> - The position of this entity's center in the world. Rotating entities typically rotate around their origin.
RenderFields:
- Render Mode
<choices> - Set a non-standard rendering mode on this entity. See Render Modes for details.
- FX Amount (0 - 255)
<int> - Intensity of the selected render mode.
- FX Color (R G B)
<color255> - Color used by the selected render mode (if applicable).
- Disable Receiving Shadows
<bool> - Prevents the entity from receiving shadows.
To do: RTT and/or shadow map?
RenderFXChoices:
- Render FX
<choices> - Several GoldSrc-era visibility modes which change the way the entity is rendered, typically by fading it in and out.
- texframeindex
- <integer> Use this to set the initial frame of materials with multiple frames in the brush
- target
- <target_destination> First path_corner
- noise1
- <sound> The sound to play when the train moves.
- noise2
- <sound> The sound to play when the train stops moving.
- speed
- <float> Speed at which the brush moves.
- volume
- <float> Sound volume 0.0 to 10.0
- dmg
- <float> Crush Damage
Flags
- 8 : Non-solid
Inputs
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
AddOutput <string> - Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
RenderFields:
- Toggle
- Toggle movement
- Start
- Start movement
- Stop
- Stop movement
- Use
- Toggle movement - has a different functionality than Toggle
Outputs
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.
