- Documentation
- Server functions
- setTrainDirection
Function
setTrainDirection
Stores the direction in which a train travels along the track.
Syntax
bool setTrainDirection(vehicle element, bool value)Arguments
elementvehicle- The train.
valuebooltrue= along the track direction,false= the opposite way.
Returns
true on success.
Example
local train = createVehicle(538, 1700, -1950, 14)
setTrainDirection(train, false)
Notes
State for scripts. See setTrainDerailed.