I made the decision to ignore callbacks the first time through too.
The articulated engine callback is callback 16. This means that, when coding a Var.02, variable 0C will have the value 16 for this callback. First, ensure that bit 4 (0x10) is set in prop 1E for the engine.
The engine's action 3 should point to a Var.02 that checks to see if variable 0C==0x16. If it is not, return the graphics, as normal. If it is, return the ID of another Var02 that checks variable 10. Unlike normal Var.02s this var 02 needs to have the high byte of the ID-word (the one that is normally "00") set to "FF". Return <Tender-ID> if variable 10 == 0x01, and FF in all other cases:
The action2s will look something like this:
Code:
-1*14 02 00 10 81 10 00 FF 01 <Tender-ID> FF 01 01 FF FF
*1*14 02 00 11 81 0C 00 FF 01 10 00 16 16 <GFX CargoID> 00
Then point the engine's action 3 to CargoID 11.
If you need different lengths for the different tenders, that's callback 11, so do something similar to:
Code:
-1*14 02 00 12 81 0C 00 FF 01 <length> FF 11 11 <GFX CargoID> 00
and point the override 3 to CargoID 12.
Note that there is no need to check any other variable here; you always want to be the same length when following this engine. For this to work, you'll need to set bit 1 (value 0x02) in the *tender*'s properties.
Hope this helped.
_________________
To get a good answer, ask a
Smart Question. Similarly, if you want a bug fixed, write a
Useful Bug Report. No TTDPatch crashlog? Then
follow directions.
Projects:
NFORenum (
download) |
PlaneSet (
Website) |
grfcodec (
download) |
grfdebug.log parser