This option first appeared in the trains. With this method may be made szerkocsis locomotive. Later, this opportunity was extended, now road vehicles may be used. Be created using articulated trucks and trailers.
A multi vehicle is the fact that two or more vehicles is attached together. Be used to create two types of vehicle. The first type is the first part of the vehicle, the second the rest of the vehicle. The autonomous vehicles in multi vehicle components, they turn to each other only in the game.
A multi vehicle making the $ 16-a callback is required.
The principle of operation: If a vehicle is the $ 16-a callback engedényezve is the first element of the game is drawn after calling the GRF-et, and a variable value in a 1-year returns, indicate that the first element has been displayed. If you then resigned with a special graphics of the game id of a vehicle is already recognized in the annexe of a particular type of vehicle to another vehicle. If this vehicle is displayed, the process starts again, a whole until it does not interrupt this process.
Returning a new vehicle to attach a value FFxx you specify where xx is attached to the vehicle type, its value can be between 0 and 254. If the return value is FFFF, the mount process stops.
As further explained in general terms does not make sense of it, here's an example which shows the preparation of an articulated bus.
The example - to be complete - includes two buses. The 284's and 435-t Ikarus.
The $ 00-dig type will be the first part of the 284 bus.
The $ 01 vehicle will be the first part of the 435 bus.
The $ 57 vehicle will hinge on which of the two commonly used Articulated.
The Model 284's creation of five blocks. The first is a normal data block. There's only so much to do box to allow callbacks to be in the $ 16 "articulate" callback et. The second block is also a basis for calculating block sprites. Here's a graphic identity for assigning the bus is the first part of the sprites were nominated. The last, fifth block is also a daily assignment block. The point of the two blocks is in változófüggő graphics.
The game is the first part of the bus is displayed, you can call the GRF-et, and $ 10 on the variable you enter, to share in the following items to be displayed. The first block változófüggő graphics check this variable. "Domain" list is just a single line. You are given one to one province, graphic identifiers and $ FF57. So if the $ 10-variable 1-year returns, the block is generated by $ 0A graphic graphic identity will be worth $ FF57. So, do not assign a block of sprites, but a value for. The $ FF57 a value which means the program, they have been rendered buszrészhez first to be accompanied by a $ 57 vehicle types. As seen above, this type of vehicle was félrerakva wrist. Then the $ 00-dig the first section binds the $ 57 wrist. The game is once again calling the GRF-et, this time with a $ 10 value of 2 will be variable. However, since only two-part buses are built, there is no need for a third element, so the default identifier grafukus specified value $ FFFF receive the block generated by $ 0A graphic identity, which indicates the program that there is no need for a third part.
Note that these blocks, the program for $ 0A changing value stored in the program is still not forthcoming. That this value, the program receives, it is necessary to block a változófüggő graphics, which in this case the second one.
There is a $ 0C variable, which specifies which callback is called to the GRF, et. In the second block of this variable query. If the $ 16-a callback (decimal 22) is forthcoming, it creates a block of $ 0F to the variable load of the previous block is generated by $ 0A variable. If this is not the callback runs in the first bus to the variable $ 0F-jai are part of the sprites. So this block is a kind of "switch" operation. So, if you display, you can give back to the Sprite $ 0F variable, and if a callback, you can give the program - $ 0F are also variable - what to do.
A 435 bus five blocks does not make sense to give details of the same functions as the 284-bus case.
Here are the wrist. It is also five blocks. The first block of the most important thing is that the callback field, to allow the $ 16 "articulate" callback et. To ensure that the wrist does not appear in the list of vehicles during the game, all four fields of climates climate should be banned.
Both sorts of buses that vehicle use wrist. The first block of the 1-sprites and graphic identity assigning the 284 bus spritejait wrist. The second block, the 2 sprites and graphic identity assigning the 435 spritejait wrist. We're just a task to determine if the display hinge is the type of vehicle bus is currently on. Therefore, there is the next block változófüggő graphics.
In the Type field in the block is $ 82 missing, since this is not the type of vehicle you want to search, but a group of vehicles in the first vehicle of the type we are interested. This type is the $ 80 + $ 42 (ie, $ C2) we know the variables. If this value is 117 *** (explanation later), then the wrist of the vehicle 435 after the bus is connected, so the block is created by the $ 10 and graphics identifying the 2-year graphics sprites were nominated will receive an identification. If not, then the only way to be 284's to $ 10 for an ID graphics and graphic identity sprites were nominated received. The following járműhozzárendelő block the vehicle from the wrist to $ 10 graphics boards gives identities are sprites, so the pass will be the "tractor"
*** The 117 figure Explanation: The TTD and in the OTTD In total 256 types of vehicle is. The first 116 types of locomotives and wagons is assigned. After that come from road vehicles. In this case, no reference should be made to the categories within the model number (which would be one), but the entire list of reference should be made on the basis of a 435-bus type. Therefore, to give 117 et. So in this case the bus type of the first type of train 116 + 1, ie, 117th
As explained above, the latest "nightly" versions are no longer true. In the meantime, been introduced to more than 256 vehicle ID can be used. OTTD's versions, which are more than 256 IDs are treated as no longer the absolute ID must be given to examining the train, but the actual vehicle ID, namely the 435 bus, the 117 figure instead of 1-year value must be given, since this is the 435-vehicle real ID.