CPathTrack
(Redirected from Path track)
Jump to navigation
Jump to search
Code classes:
CPathTrack
CPointEntity
CBaseEntity
(all ents)
CPathTrack
is a code class in all Source games.
Classnames:
path_track
- When multiple of these are put together, they define a path that other entities can follow.
Tip: If the Name (targetname)
and Next Stop Target keyvalues are set, the entity can be dragged while holding ⇧ Shift to create the next node in the path while automatically updating those two keyvalues.
Tip: path_track
s can be made even more dynamic by changing Next Stop Target with AddOutput, however this may not work depending on what it is that's moving on the path. func_tracktrain
s will not be affected by the change, but NPCs will.
Flags[edit | edit source]
- 1: Disabled - Starts disabled.
func_tracktrain
s will not move to this node and will stop at the last enabled node.
- 2:
Fire once- Commented out in code.
- 4: Branch Reverse - If the entity on this path is a
func_tracktrain
, it will use Branch Paths when in reverse (and only in reverse).
- 8: Disable train - When a
func_tracktrain
passes over this entity, its No User Control flag will get set.
- 16: Teleport to THIS path track - If the entity on this path is a
func_tracktrain
ornpc_vehicledriver
, they will teleport to this track node, as opposed to navigating to it normally. Note:func_tracktrain
will automatically teleport to its firstpath_track
.
- 32: Part of an uphill path (only available in ) - Makes the area from this
path_track
to the next a rollback zone in Payload. If the cart is left alone on this stretch of the track, it will fall back to the start of the rollback zone.
- 64: Part of a downhill path (only available in ) - Makes the area from this
path_track
to the next a rollforward zone in Payload. If the cart is left alone on this stretch of the track, it will coast forward until it reaches the end of the rollforward zone.
- 32768: Start on Branch (Not in FGD) - The entity will send path followers to Branch Path by default.
Keyvalues[edit | edit source]
- Next Stop Target
(target)
<target_destination>
- The next
path_track
in the path. - Branch Path
(altpath)
<target_destination>
- An alternative
path_track
to be the next node in the path. Useful for making branching paths. Must be enabled with EnableAlternatePath. - New Train Speed
(speed)
<float>
- When a
func_tracktrain
meets this entity, its speed will be set to this. Cannot be higher than Max Speed(startspeed)
. - Path radius
(radius)
<float>
- Used by
npc_helicopter
andnpc_combinegunship
. If the NPC gets this close to the track node, it will be considered to have been passed. - Orientation Type
(orientationtype)
<choices>
- The way that the path follower faces as it moves through this path track.
- 0: No change
- 1: Face direction of motion
- 2: Face this path_track's angles
Inputs[edit | edit source]
- EnableAlternatePath
- Makes the entity send path followers to Branch Path.
- DisableAlternatePath
- Makes the entity send path followers through the regular path again.
- ToggleAlternatePath
- Switches the entity between the two path nodes.
- EnablePath
- Enables this path node.
- DisablePath
- Disables this path node.
- TogglePath
- Switches the path node between its enabled and disabled states.
- InPass (Not in FGD)
- Fires OnPass. Normally the path follower entity sends this to the path node when it reaches that point.
- InTeleport (Not in FGD) (only available in games before Left 4 Dead)
- Fires OnTeleport. Normally the path follower entity sends this to the path node when it teleports to it.
Outputs[edit | edit source]
- OnPass
- Fires when an entity passes this node.
- OnTeleport (only available in games before Left 4 Dead)
- Fires when an entity teleports to this node.