func_train
< Zh
Jump to navigation
Jump to search
| CFuncTrain |
func_train是实体笔刷,可在所有的
起源 游戏中使用。
它是从
雷神之锤 遗留下来的实体,在一系列 path_corner 的起点和终点之间来回移动。与 func_tracktrain 不同,它在转弯时不会旋转。
func_tracktrain 所遇到的转弯不精确问题的影响,使其成为快速移动物体的良好替代方案。 Default.Null 并将音量设为 0 以不播放任何音效。 [todo tested in ?]Keyvalues
- Name (targetname) <target_source>[ Edit ]
-
这个名称是其他实体通过 输入/输出 或其他 关键值(如
parentname或target) 来引用该实体时使用的标识符。
该名称也会显示在 Hammer 编辑器的 2D 视图和 实体报告 中。
参见: 所有实体均可使用的 通用键值、输入与输出
- Pitch Yaw Roll (Y Z X) (angles) <QAngle>
- 列车的初始方向。
- Angular Velocity (Y Z X) (avelocity) <vec3> 不存在于FGD!
-
缺省值: 0 0 0
Per-axis rotation speed while the train is moving. Use the same speed values as func_rotating.
- Spawn path_corner (target) <target_destination>
- 列车路径中第一个 path_corner 的名称。列车将在此 path_corner 处生成。
- Speed (speed) <浮点型>
- 列车移动的速度。
- Movement Sound (noise1) <sound>
- The sound to play when the train moves.
- Stop Sound (noise2) <sound>
- The sound to play when the train stops moving.
-
Move Sound index (movesnd) <integer choices> (仅存在于

之中)
-
The sound to play when the train moves. Overrides
noise1, even if absent.
Choices - 0: Plat.DefaultMoving
- 1: Plat.BigElev1
- 2: Plat.BigElev2
- 3: Plat.TechElev1
- 4: Plat.TechElev2
- 5: Plat.TechElev3
- 6: Plat.FreightElev1
- 7: Plat.FreightElev2
- 8: Plat.HeavyElev
- 9: Plat.RackElev
- 10: Plat.RailElev
- 11: Plat.SqueakElev
- 12: Plat.OddElev1
- 13: Plat.OddElev2
-
Stop Sound index (movesnd) <integer choices> (仅存在于

之中)
-
The sound to play when the train stops moving. Overrides
noise2, even if absent.
Choices - 0: Plat.DefaultArrive
- 1: Plat.BigElevStop1
- 2: Plat.BigElevStop2
- 3: Plat.FreightElevStop
- 4: Plat.HeavyElevStop
- 5: Plat.RackStop
- 6: Plat.RailStop
- 7: Plat.SqueakStop
- 8: Plat.QuickStop
- Sound Volume 0.0 - 1.0 (volume) <normal>
- Sound volume
- Crush Damage (dmg) <浮点型>
- 对阻挡列车的实体造成的伤害量。
Flags
- Wait to retrigger(等待重新触发,由游戏代码设置和取消;不应手动设置) : [1]
- Non-solid(非固体) : [8]
Inputs
- Toggle
- 切换移动
- Start
- 开始移动
- Stop
- 停止移动
FGD 代码
@SolidClass base(Targetname, Origin, Angles, RenderFields) line(255 255 0, targetname, target) = func_train: "An old entity leftover from Quake. It follows a series of path_corner entities."
[
spawnflags(flags) =
[
8 : "Non-solid" : 0
]
target(target_destination) : "Spawn path_corner" : : "The name of the first path_corner in the train's path. The train will spawn at this path_corner."
speed(float) : "Speed" : "50" : "Speed at which the train moves."
avelocity(vector) : "Angular Velocity (Y Z X)" : "0 0 0" : "Per-axis rotation speed of the train while it moves."
noise1(sound) : "Movement Sound" : "Default.Null" : "The sound to play when the train moves. This must be specified, but can be set to 'Default.Null' to play no sound."
noise2(sound) : "Stop Sound" : "Default.Null" : "The sound to play when the train stops moving. This must be specified, but can be set to 'Default.Null' to play no sound."
volume(float) : "Sound volume (0-10)" : "10" : "Volume of the sounds emitted when moving and stopping."
dmg(float) : "Crush Damage" : "0" : "Amount of damage to deal to entities blocking the train."
// Inputs
input Toggle(void) : "Toggle movement"
input Start(void) : "Start movement"
input Stop(void) : "Stop movement"
]