Func traincontrols: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Used KV/I/O BaseEntity templates. Template:in code -> Template:code class. Added back button.)
Line 1: Line 1:
{{base brush|func_traincontrols}}  
{{back|Trains}}
{{base brush|func_traincontrols}}
{{code class|CFuncTrainControls|trains.cpp}}


==Entity description==
== Entity Description ==
When used by the player, this entity gives control over the movement of a train using the player's movement keys.  
When {{ent|+use}}d by the [[player]], this entity gives control over the movement of a train using the player's movement keys.  


{{in code|class=class_c_func_train_controls.html CFuncTrainControls|file=trains_8cpp-source.html trains.cpp}}
== KeyValues ==
{{KV Global}}
{{KV BaseEntity|brush=1}}


==Keyvalues==
== Inputs ==
{{Not in FGD}} {{KV Targetname}}
{{I BaseEntity}}
{{KV Parentname}}
{{KV Global}}


==Inputs==
== Outputs ==
{{I Parentname}}
{{O BaseEntity|l4d=1}}

Revision as of 11:58, 15 May 2022

Trains

Template:Base brush

C++ In code, it is represented by theCFuncTrainControlsclass, defined in thetrains.cppfile.

Entity Description

When +used by the player, this entity gives control over the movement of a train using the player's movement keys.

KeyValues

Global:
Global Entity Name (globalname) <string>
Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.


Inputs

Outputs