Template:I BaseTrain
...
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 )- Accel/Decel to the specified speed, as a ratio of max speed. Negative values reverse the direction [-1, 1]
SetSpeedForwardModifier
<float> (removed since )- Applies the given modifier to all forward speeds. [0, 1]
TeleportToPathTrack
<targetname> (removed since )- Teleport the train to the designated path track. This can be in a new path.
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,
SetSpeedDirAccel
did later get ported in Left 4 Dead 2.MoveToPathNode
<targetname> (in all games since )- 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 )- Teleport to another path_track and stop the train. This can be in a new path.
SetMaxSpeed
<float> (in all games since )- Set a new max speed for the train.
Stop
- Stop the train.
StartForward
- Start the train moving forward.
StartBackward
- Start the train moving backward.
- Bug: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.
Resume
- Resume the train moving in the current direction after it was stopped via the
Stop
orToggle
input.
Reverse
- Reverse the direction of the train.
Toggle
- Toggle the train between start and stop.
Base:
AddContext
<string>- Adds to the entity's list of response contexts. See Context.
AddOutput
<string>- Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed:
// Format of changing KeyValues: "AddOutput [key] [value]"
//// Raw text:
"OnUser1" "!self,AddOutput,targetname new_name"
// Format of adding an Output: "AddOutput {targetname}:{inputname}:{parameter}:{delay}:{max times to fire, -1 means infinite}"
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// Arguments can be left blank, but the empty blank should still be contained.
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"
|
ClearContext
- Removes all contexts from this entity's list.
ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
FireUser1
toFireUser4
- Fires the respective
OnUser
outputs; see User Inputs and Outputs.
Kill
- Removes this entity and any entities parented to it from the world.
KillHierarchy
- Functions the same as
Kill
, although this entity and any entities parented to it are killed on the same frame, being marginally faster thanKill
input.
RemoveContext
<string>- Remove a context from this entity's list. The name should match the key of an existing context.
SetParent
<string>- Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment
<string>- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset
<string>- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
DispatchResponse
<string> !FGD- Dispatches a response to the entity. See Response and Concept.
DispatchEffect
<string> (removed since ) !FGD- Dispatches a special effect from the entity's origin; See also List of Client Effects. Replaced by the particle system since .
RunScriptFile
<script> (in all games since ) (also in )- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode
<string> (in all games since ) (also in )- Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. Bug:In Hammer, using string arguments will corrupt the VMF file's structure, making the file unviewable for the next Hammer session.Fix:Remove the string argument manually with a text editor.
CallScriptFunction
<string> (in all games since ) (also in ) !FGD- Calls a VScript function defined in the scope of the receiving entity.
TerminateScriptScope
(only in ) !FGD- Destroys the script scope of the receving entity.
SetLocalOrigin
<coordinates> (in all games since ) !FGD- Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
Visible Brush:
Alpha
<integer 0–255>- Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its Render Mode (rendermode) set to a number other than
0
.
AlternativeSorting
<boolean>- Swaps the rendering order of the entity. Used to attempt to fix sorting problems when rendering, for example an object rendering in front of translucent materials.
Color
<color255>- Sets an RGB color for the entity.
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.
EnableDraw
(in all games since )- Removes
EF_NODRAW
from the entity.
DisableDraw
(in all games since )- Applies
EF_NODRAW
to the entity. Note that this is different fromrendermode 10
.
EnableReceivingFlashlight
(in all games since )- Makes it so that the entity is lit by
env_projectedtexture
s.
DisableReceivingFlashlight
(in all games since )- Prevents the entity from being lit by
env_projectedtexture
s. The shadow made by the texture will still cast.
Reflection:
DisableDrawInFastReflection
(in all games since )- Turns off rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material.
EnableDrawInFastReflection
(in all games since )- Turn on rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material.
Shadow:
DisableShadow
- Turn dynamic shadows off for this entity. Identical to applying
EF_NOSHADOW
.
EnableShadow
- Turn dynamic shadows on for this entity.
DisableReceivingFlashlight
(in all games since )- This object will not receive light or shadows from projected textures.