

In some of the following variables, carIndex has the following meaning: 0 is the 1 st car from the front, 1 is the 2 nd car from the front, etc., while -1 is the 1 st car from the rear, -2 is the 2 nd car from the rear, etc. For scenery objects, the reference is the driver’s car of the nearest train (not necessarily the player’s train). Generally, objects attached to a particular train and car return values for that train and car, unless stated otherwise. Returns 0 if the camera is currently in a 2D or 3D cab, 1 otherwise. The non-negative cartesian distance measured on the Z axis from the object to the camera in meters The non-negative cartesian distance measured on the Y axis from the object to the camera in meters The non-negative cartesian distance measured on the X axis from the object to the camera in meters

The non-negative cartesian distance measured from the object to the camera in meters. The current in-game time measured in seconds since midnight of the first day. You can use parantheses to override the order of precedence just as in any usual mathematical formula. For operators, precedence plays an important role. Some functions do not have an infix operator and can thus only be entered in functional notation. Thus for every infix notation, there is a corresponding functional notation. If you are using these commands, please get rid of them as soon as possible.įirst of all, infix notation, which is what you can enter for Formula, is converted into functional notation. While they are still available undocumentedly, they will be removed for openBVE 2. These commands never made it into any official release (v1.0) and were thus never meant to be used outside of development environments. Texture shifts - allowing to shift the texture coordinates of objects in two independent directionsĭuring the development of openBVE (v0.9) and during the development of the animated object format, there were certain commands in existance ending in RPN, such as TranslateXFunctionRPN.Rotation - rotating objects around three independent axes.Translation - moving objects in three independent directions.State changes - basically allowing to switch between different objects at any time.

