LZB

The LZB system is used to make trains aware of oncoming speed restrictions or blocked tracks. It provides and works together with the approach node callback.

advtrains.lzb_add_checkpoint()

This function adds a “LZB Checkpoint” for the specified ''train'' Table at the specified index. This causes the following things to happen:

advtrains.lzb_add_checkpoint(train, index, speed, callback, udata)
udata: Arbitrary data to be saved with the checkpoint. There is no official interface on how to access this, it is only used internally for the "Remote Routesetting" button.

The 'callback' has the following synopsis:

callback = function(pos, id, train, index, speed, lzbdata)
The parameters are identical to lzb_add_checkpoint, except
lzbdata: Should be ignored for now.