Template:Archived Page History/Template:I BaseTrain: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (updated templates used.)
(Finally solved the mystery with these inputs, I think. Also added missing portal 2 inputs)
Line 4: Line 4:
{{IO|SetSpeedDir|Set the speed of the train, as a ratio of max speed. Negative values reverse the direction [-1, 1]|param=float}}
{{IO|SetSpeedDir|Set the speed of the train, as a ratio of max speed. Negative values reverse the direction [-1, 1]|param=float}}
{{IO|SetSpeedReal|Set the speed of the train. Must be a positive value from 0 to max speed.|param=float}}
{{IO|SetSpeedReal|Set the speed of the train. Must be a positive value from 0 to max speed.|param=float}}
{{IO|SetSpeedDirAccel|Accel/Decel to the specified speed, as a ratio of max speed. Negative values reverse the direction [-1, 1]|param=float}}
{{IO|SetSpeedDirAccel|Accel/Decel to the specified speed, as a ratio of max speed. Negative values reverse the direction [-1, 1]|param=float|not={{l4d}}}}
{{IO|SetSpeedForwardModifier|Applies the given modifier to all forward speeds. [0, 1]|param=float}}
{{IO|SetSpeedForwardModifier|Applies the given modifier to all forward speeds. [0, 1]|param=float|removed={{l4d}}}}
{{IO|TeleportToPathTrack|Teleport the train to the designated path track.|param=targetname|removed={{l4d}}}} {{todo|Does this differ from TeleportToPathNode in any way, does it need to be in the same path?}}
{{IO|TeleportToPathTrack|Teleport the train to the designated path track. This can be in a new path.|param=targetname|removed={{l4d}}}}
{{note|The above three inputs appear to have been added to [[Source 2007]] games post-release for TF2's Payload mode, but did not make it into later games, resulting in their apparent "removal". However, <code>SetSpeedDirAccel</code> did later get ported in {{l4d2|4}}.}}
{{IO|MoveToPathNode|Move the train to a specific path_track, stopping when it gets there. Must be in the same path.|param=targetname|since={{portal2}}}}
{{IO|MoveToPathNode|Move the train to a specific path_track, stopping when it gets there. Must be in the same path.|param=targetname|since={{portal2}}}}
{{IO|TeleportToPathNode|Teleport to another path_track and stop the train. This can be in a new path.|param=targetname|since={{portal2}}}}
{{IO|TeleportToPathNode|Teleport to another path_track and stop the train. This can be in a new path.|param=targetname|since={{portal2}}}}
{{confirm|What games these were added/removed in, it's very confusing - the above is just what the FGDs on this wiki seemed to indicate.}}
{{IO|LockOrientation|Lock the current orientation of the train.|since={{portal2}}}}
{{IO|UnlockOrientation|Unlock the current orientation of the train.|since={{portal2}}}}
{{IO|SetMaxSpeed|Set a new max speed for the train.|param=float|since={{portal2}}}}
{{IO|Stop|Stop the train.}}
{{IO|Stop|Stop the train.}}
{{IO|StartForward|Start the train moving forward.}}
{{IO|StartForward|Start the train moving forward.}}

Revision as of 22:55, 4 April 2023

BaseTrain:
SetSpeed <float>
Set the speed of the train, as a ratio of max speed [0, 1]
SetSpeedDir <float>
Set the speed of the train, as a ratio of max speed. Negative values reverse the direction [-1, 1]
SetSpeedReal <float>
Set the speed of the train. Must be a positive value from 0 to max speed.
SetSpeedDirAccel <float> (not in Left 4 Dead)
Accel/Decel to the specified speed, as a ratio of max speed. Negative values reverse the direction [-1, 1]
SetSpeedForwardModifier <float> (removed since Left 4 Dead)
Applies the given modifier to all forward speeds. [0, 1]
TeleportToPathTrack <targetname> (removed since Left 4 Dead)
Teleport the train to the designated path track. This can be in a new path.
Note.pngNote:The above three inputs appear to have been added to Source 2007 games post-release for TF2's Payload mode, but did not make it into later games, resulting in their apparent "removal". However, SetSpeedDirAccel did later get ported in Left 4 Dead 2 Left 4 Dead 2.
MoveToPathNode <targetname> (in all games since Portal 2)
Move the train to a specific path_track, stopping when it gets there. Must be in the same path.
TeleportToPathNode <targetname> (in all games since Portal 2)
Teleport to another path_track and stop the train. This can be in a new path.
LockOrientation  (in all games since Portal 2)
Lock the current orientation of the train.
UnlockOrientation  (in all games since Portal 2)
Unlock the current orientation of the train.
SetMaxSpeed <float> (in all games since Portal 2)
Set a new max speed for the train.
Stop
Stop the train.
StartForward
Start the train moving forward.
StartBackward
Start the train moving backward.
Icon-Bug.pngBug:If the train's corresponding path_tracks do not have "New Train Speed" set to a nonzero number, StartBackward will exhibit undesired behavior including the train freezing or moving in the wrong direction. This bug can be a pain if the train needs to ride through the path_track again at a different speed. This can be fixed by firing an "addOutput speed '#'" input at the path_track in question.  [todo tested in ?]
Resume
Resume the train moving in the current direction after it was stopped via the Stop or Toggle input.
Reverse
Reverse the direction of the train.
Toggle
Toggle the train between start and stop.


SetDamageFilter <targetname>
Sets a filter for this entity for when it receives damage.
EnableDamageForces
Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).
DisableDamageForces
Prevents the entity from being pushed by damage done to it.
Todo: move/mention at proper place