JTraffic Screensaver

[N: ]

[N: <#><Type>,<#><PictureName>, <Y> ]

Neighbors

Changes a vehicle's end based on its neighbor's <Type>.

By using the [N: ] command one can join diaphragms between passenger coaches, air hoses as well as other types of connections between two vehicles.  They are "dependent overlays."

A more complete description of the command takes the Form:

[NL: <Type>,<PictureName>,<Y> ][NR: <Type>, # <PictureName>,<Y> ]

If the neighboring vehicle to the left has the type <Type>, then the left side of the picture will be overlaid with the picture <PictureName> . If the neighboring vehicle to the right has the type <Type>, than the right side will be overlaid with the mirrored image of <PictureName>. Additionally, the vehicle has on both sides the type <Type>, so it's neighbours will also change their side pictures, if they have the appropriate definitions.

If the command is used in the format [N : # <Type>,<PictureName>,<Y> ] it has the same meaning as the longer form:

[NL:# <Type>,<PictureName>,<Y> ][NR:# <Type>, # <PictureName>,<Y> ]

and means that the original picture is overlaid with the picture referenced in <PictureName> when it is coupled to another vehicle without the type <Type> or if it travels alone.

All of the transparent pixels of the overlay picture are transferred to the original picture.  In this fashion existing pixels can be "erased."

The commands [TN: ], [TL: ] and [TR: ] denote a transparent copy.  That is, one can see through the transparent parts of the overlay picture to any parts of the original picture which would be visible.  Using   [Tx: ], however, one cannot erase any existing pixels, rather only add new ones.

The neighboring relations will be evaluated before the trains enter the screen - the wagons will be coupled correctly -, and additionally, they will be evaluated after each coupling and decoupling step in the movements. It means, before train parts move away from each other, the state of the two sides at the decoupling point will be changed to their "not coupled" state. Similarly, after train parts are coupled, before the coupled train starts to move, the sides will be changed to their coupled state - the diaphragms, the air hoses will be connected.

The types are stored separately for the left and right side of a vehicle. It is possible the have different behaviour on the two sides - for example, a control cab can have a diaphragm and an air hose on it's back side, but only an air hose on it's front side.

There is a convention for naming the types:

B Air hose (Break)
C Coupling
K Cable
P Diaphragm (Passenger)

for special connections - for example for multiple cables between a certain type of locomotives - use a longer name, containing more than 1 character.

The type name C is not only a convention any more - there are some movements ( for example M=UNIT, M=CUT2 ) which handle these type specially, changing the state at a different time. The side variations C will be brought to their coupled state at the moment the trains stop a small distance before each other, before the final approach. In case of the M=CUT2 movement they will be brought back to their uncoupled state after the trains make a similar short move as before the coupling, having a small distance between them.

The <PictureName> parameter can point to a animation - a Stock List entry containing an [ANIM: ] modifier. In that case the changing of the side look of the vehicles will be animated, shown all the phase pictures. One can use this possibility for special effect - for example drawing the person, who makes the coupling - decoupling, it this person appears during the animation, and disappears before the end (for example comes from behind the vehicle).

Overview
The Configuration Window
Program Window
Stock List
Description Editor
Graphic Testpad
Timetable Editor
Timetable Syntax and Semanics
The timetable header
Sections, Groups, Lines, Scenes
Actions
Stock List File