Difference between revisions of "TrainCarts/Signs/Station"
Bergerhealer Wiki>RyanDo (→Syntax) |
Bergerkiller (talk | contribs) |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[TrainCarts/Signs|« Go back]] | + | <languages/> |
+ | <translate> | ||
+ | <!--T:1--> | ||
+ | [[Special:MyLanguage/TrainCarts/Signs|« Go back]] | ||
− | |||
− | [[ | + | == Introduction == <!--T:2--> |
+ | |||
+ | <!--T:3--> | ||
+ | [[File:TrainCarts station centred.png|thumb|A train is idling above a station sign]] | ||
Stations are used to stop and launch trains, optionally using a set delay in seconds. It can use redstone to set the direction to launch to, but when both sides are powered it can perform an automated action. | Stations are used to stop and launch trains, optionally using a set delay in seconds. It can use redstone to set the direction to launch to, but when both sides are powered it can perform an automated action. | ||
− | == Syntax == | + | == Syntax == <!--T:4--> |
+ | </translate> | ||
{{sign|[train]|station|5|continue}} | {{sign|[train]|station|5|continue}} | ||
+ | <translate> | ||
+ | |||
− | === First line === | + | === First line === <!--T:5--> |
+ | <!--T:6--> | ||
When ''[train]'' is used, the train is centered above the sign. This means that the middle cart of the train will stop above the sign. When ''[cart]'' is used, the train will stop immediately, the first cart centered above the sign. | When ''[train]'' is used, the train is centered above the sign. This means that the middle cart of the train will stop above the sign. When ''[cart]'' is used, the train will stop immediately, the first cart centered above the sign. | ||
− | |||
+ | === Second line === <!--T:7--> | ||
+ | |||
+ | <!--T:8--> | ||
''Station'' followed up by an optional number. This number sets the distance to launch the trains at. The higher this number, the slower it will launch. Use only ''station'' to make the plugin calculate this distance automatically. Then it launches the train towards the first curved track piece up to 100 blocks away. | ''Station'' followed up by an optional number. This number sets the distance to launch the trains at. The higher this number, the slower it will launch. Use only ''station'' to make the plugin calculate this distance automatically. Then it launches the train towards the first curved track piece up to 100 blocks away. | ||
− | === Third line === | + | <!--T:22--> |
+ | You can also specify a 'center offset' value, which changes where the train will stop on the station. This is done by specifying '''<distance>m''', for example ''''20.5m''''. | ||
+ | |||
+ | <!--T:23--> | ||
+ | The below station sign will launch a train 30 blocks away, and center the train with a 12.5 block offset above the sign. The train waits for 10 seconds and then continues: | ||
+ | {{sign|[+train]|station 30 12.5m|10|continue}} | ||
+ | |||
+ | === Third line === <!--T:9--> | ||
+ | |||
+ | <!--T:10--> | ||
''' | ''' | ||
An optional delay in seconds. This delay is used when launching. For example, when the right side is powered and a delay of 3 seconds is set, and a train enters, the train will wait for 3 seconds and then launch into the powered direction.''' | An optional delay in seconds. This delay is used when launching. For example, when the right side is powered and a delay of 3 seconds is set, and a train enters, the train will wait for 3 seconds and then launch into the powered direction.''' | ||
− | |||
− | Sets the mode used when both sides are powered. The station sign will launch trains into the direction that is powered. If the sign receives no power whatsoever, it is not active and trains will travel right through. The inverted redstone option ([!train]) is still active here, so if power is inverted and the sign receives no power, it is as if all sides a powered. | + | === Fourth line === <!--T:11--> |
+ | |||
+ | <!--T:12--> | ||
+ | Sets the mode used when both sides are powered. The station sign will launch trains into the direction that is powered. If the sign receives no power whatsoever, it is not active and trains will travel right through. The inverted redstone option ([!train]) is still active here, so if power is inverted and the sign receives no power, it is as if all sides a powered. | ||
+ | <!--T:13--> | ||
The station will hold the train forever if both sides are powered, unless one of the below four types is set on the fourth line: | The station will hold the train forever if both sides are powered, unless one of the below four types is set on the fourth line: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 33: | Line 56: | ||
|- | |- | ||
| [[File:Sign 1.png|thumb]] | | [[File:Sign 1.png|thumb]] | ||
− | | [[Image:TrainCarts station left.gif]] | + | | [[Image:TrainCarts station left.gif|Image:TrainCarts station left.gif]] |
|- | |- | ||
| [[File:Sign 2.png|thumb]] | | [[File:Sign 2.png|thumb]] | ||
− | | [[Image:TrainCarts station right.gif]] | + | | [[Image:TrainCarts station right.gif|Image:TrainCarts station right.gif]] |
|- | |- | ||
| [[File:Sign 3.png|thumb]] | | [[File:Sign 3.png|thumb]] | ||
− | | [[Image:TrainCarts station continue.gif]] | + | | [[Image:TrainCarts station continue.gif|Image:TrainCarts station continue.gif]] |
|- | |- | ||
| [[File:Sign 4.png|thumb]] | | [[File:Sign 4.png|thumb]] | ||
− | | [[Image:TrainCarts station reverse.gif]] | + | | [[Image:TrainCarts station reverse.gif|Image:TrainCarts station reverse.gif]] |
|} | |} | ||
− | == Examples == | + | ==== Auto Routing ==== <!--T:20--> |
+ | Instead of specifying a fixed direction, <code>route</code> can be put instead. This will make the station sign part of the [[Special:MyLanguage/TrainCarts/PathFinding|path finding network]], and launches the train into the most appropriate direction to reach its destination. | ||
+ | |||
+ | <!--T:21--> | ||
+ | This will route the train to its destination, if set. Otherwise, resumes the train in the same direction it was approaching the station. | ||
+ | {{sign|[train]|station||route continue}} | ||
+ | |||
+ | |||
+ | ==== Launch Speed ==== <!--T:17--> | ||
+ | A number can also be put on the fourth line to set the launch speed of the station sign. | ||
+ | </translate> | ||
+ | {{sign|[train]|station||0.4}} | ||
+ | |||
+ | |||
+ | {{sign|[train]|station|5|continue 0.4}} | ||
+ | <translate> | ||
+ | |||
+ | == Lever Output == <!--T:18--> | ||
+ | While a train is waiting on the station, the station toggles levers attached to the same block the station sign is attached to. This can be used to, for example, change the [[Special:MyLanguage/TrainCarts/Signs/Property|player exit property]], open doors or [[Special:MyLanguage/TrainCarts/Signs/Ejector|automatically eject]] the players inside. | ||
+ | |||
+ | <!--T:19--> | ||
+ | <gallery widths=300px heights=250px> | ||
+ | File:Tc_station_lever_one.png|Lever is toggled while a train waits on a station|alt=alt language | ||
+ | File:Tc_station_lever_two.png|Alternative setup with a wall sign|alt=alt language | ||
+ | File:Tc_station_enterexit.png|Station output is used to automatically enable/disable players entering and exiting the train | ||
+ | </gallery> | ||
+ | |||
+ | == Examples == <!--T:14--> | ||
+ | |||
+ | === Shuttle-run === <!--T:15--> | ||
− | + | <!--T:16--> | |
− | [[File:TrainCarts-Shuttle-run.gif]] | + | [[File:TrainCarts-Shuttle-run.gif|File:TrainCarts-Shuttle-run.gif]] |
+ | </translate> |
Latest revision as of 15:19, 23 September 2024
Introduction
Stations are used to stop and launch trains, optionally using a set delay in seconds. It can use redstone to set the direction to launch to, but when both sides are powered it can perform an automated action.
Syntax
First line
When [train] is used, the train is centered above the sign. This means that the middle cart of the train will stop above the sign. When [cart] is used, the train will stop immediately, the first cart centered above the sign.
Second line
Station followed up by an optional number. This number sets the distance to launch the trains at. The higher this number, the slower it will launch. Use only station to make the plugin calculate this distance automatically. Then it launches the train towards the first curved track piece up to 100 blocks away.
You can also specify a 'center offset' value, which changes where the train will stop on the station. This is done by specifying <distance>m, for example '20.5m'.
The below station sign will launch a train 30 blocks away, and center the train with a 12.5 block offset above the sign. The train waits for 10 seconds and then continues:
Third line
An optional delay in seconds. This delay is used when launching. For example, when the right side is powered and a delay of 3 seconds is set, and a train enters, the train will wait for 3 seconds and then launch into the powered direction.
Fourth line
Sets the mode used when both sides are powered. The station sign will launch trains into the direction that is powered. If the sign receives no power whatsoever, it is not active and trains will travel right through. The inverted redstone option ([!train]) is still active here, so if power is inverted and the sign receives no power, it is as if all sides a powered.
The station will hold the train forever if both sides are powered, unless one of the below four types is set on the fourth line:
Sign | Result |
---|---|
Auto Routing
Instead of specifying a fixed direction, route
can be put instead. This will make the station sign part of the path finding network, and launches the train into the most appropriate direction to reach its destination.
This will route the train to its destination, if set. Otherwise, resumes the train in the same direction it was approaching the station.
Launch Speed
A number can also be put on the fourth line to set the launch speed of the station sign.
Lever Output
While a train is waiting on the station, the station toggles levers attached to the same block the station sign is attached to. This can be used to, for example, change the player exit property, open doors or automatically eject the players inside.