Docs / Routes and rail / Trolleybuses
Driving a trolleybus
Keys#
| Key | Where | Does |
|---|---|---|
| R (hold) | Outside, near the back of the bus | Take the rope of the nearest pole. It rises to just under the wire you look at. Let go and its spring puts it on |
| T | The same | Pull the nearest pole down: the shoe off the wire, the boom on its hook |
| Shift+R / Shift+T | The same | Both poles |
| Ctrl+R | Anywhere, the cab too | Both poles on the wire by themselves, or down if one is on. Not when the keyboard file or the bus uses Ctrl+R |
"Outside" means on foot, in the outside camera or in the free camera. Get out on foot with
Ctrl+Shift+G (the get_up setting). The outside camera is F3.
In the cab, R and T belong to the gearbox. There the poles answer the cab's own switch and
Ctrl+R. In the cab only poles with a motor (motor 1) answer, and they find the wire by
themselves.
The game's auto-start (Shift+U) also puts the poles on the wire, when each has a wire within reach.
Putting a pole on by hand#
- Walk to the back of the bus, or use the outside or free camera.
- Hold R. The rope of the nearest pole is in your hand, and the boom follows where you look (the wire it meets within 1.4 m of the cross-hairs).
- Let go of R. The spring lifts the shoe into the wire, if you aimed true. The shoe's horns
catch a wire within 12 cm by default (
funnel).
A hand is not steady: a boom aimed from the ground wanders a few centimetres.
With the mouse#
In the cab, a click on the cab's pole switch (cp_SHTANGALEV, cp_SHTANGAPRAV, or what the
model calls it) has the motor raise that pole to the wire nearest its tip. The hand lets go when
it is up. One pole at a time. T still pulls a pole down by its rope.
Outside, a click on a pole takes its rope in hand where it is:
- moving the mouse up lets it rise, down pulls it down, sideways swings it;
- the next click lets go, and the spring lifts the shoe into the wire just above it, or loose past it;
- pushed up through a wire, the shoe takes it and the hand lets go;
- let go a little over its hook, the pole catches on the hook;
- a pole on the wire is taken off the same way, with an arc under current.
A plain trolleybus draws no boom of its own. Its model's raised pole mesh is turned about its
hinge by Trolley_Pole<k>_Elev and _Azim. The cab's switch reads 0 with the pole on its hook
(the folded mesh) and 1 otherwise.
A model that holds the ropes itself#
A model can handle its ropes with its own [mouseevent]s on the boom and the rope, as OMSI 2
trolleybuses do. Its script declares and writes, for each pole k:
| Variable | Meaning |
|---|---|
Trolley_Pole<k>_Rope |
1 the rope is held (its mouse event pressed), -1 pulled down (a retriever), 0 let go |
Trolley_Pole<k>_Rope_X, _Rope_Y |
The mouse movement while held, in pixels: (L.S.mouse_x) / _y of its _drag, added up. The game reads them each step and sets them to 0 |
A pole with these variables takes no click of the game's own. The hand works as above, held while the mouse button is.
Something wrong or missing? Fix it on GitHub or open an issue.