This shows you the differences between two versions of the page.
modding:developerinfo:models:reversiblevehicles [2018/12/14 15:39] tom |
modding:developerinfo:models:reversiblevehicles [2019/03/19 10:18] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Reversible vehicles ===== | ||
- | ==== Overview ==== | ||
- | |||
- | Rail vehicles can be configured to not flip when turning around in a station, but instead to reverse direction. The lights and the driver position can be configured accordingly. | ||
- | |||
- | === transportvehicle === | ||
- | |||
- | In order for a train to be able to reverse direction, the first and last transportvehicle in a composition has to be configured with the reversible parameter. | ||
- | |||
- | <code lua> | ||
- | transportVehicle = { | ||
- | -- other configurations | ||
- | seats = { | ||
- | { group = 1, transf = [...], crew = true, standing = false}, -- optional driver in forward position | ||
- | { group = 1, transf = [...], crew = true, standing = false, forward = false}, -- optional driver in backward position | ||
- | }, | ||
- | reversible = true | ||
- | } | ||
- | </code> | ||
- | |||
- | === railvehicle === | ||
- | |||
- | The visibility of models can be controlled depending on the travel direction. Note that forward facing models only apply to the first, and backward facing models only the last vehicle in the composition. | ||
- | |||
- | <code lua> | ||
- | railVehicle = { | ||
- | -- other configurations | ||
- | configs = { | ||
- | { | ||
- | -- other configurations | ||
- | frontForwardParts = { }, -- optional list of model ids facing in driving direction while traveling forward | ||
- | frontBackwardParts = { }, -- optional list of model ids facing in driving direction while traveling backwards | ||
- | backForwardParts = { }, -- optional list of model ids facing against driving direction while traveling forward | ||
- | backBackwardParts = { }, -- optional list of model ids facing against driving direction while traveling backwards | ||
- | innerForwardParts = { }, -- optional list of model ids shown while traveling forwards | ||
- | innerBackwardParts = { } -- optional list of model ids shown while traveling backwards | ||
- | } | ||
- | } | ||
- | } | ||
- | </code> |