Varaction2 to test which loco is pulling the consist?

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Varaction2 to test which loco is pulling the consist?

Post by AndersI »

I know how to do a 'wagon override', ie. the engine controls the livery of one or more wagon types, but how do I do it the other way around?

To me, it feels much more logical to have the varaction2 chain for a wagon test if the engine is X (or Y or Z...) and select a special livery from that, especially if there are more than one engine type involved. But I can't find anything for it in the Wiki.

Am I blind? Stupid? Or is the answer only that "it isn't done that way"?
dandan
Route Supervisor
Route Supervisor
Posts: 414
Joined: 17 Feb 2008 23:01

Re: Varaction2 to test which loco is pulling the consist?

Post by dandan »

You can check variable C6 for the vehicle ID you want. You have to use varaction type 82 to get the info from the "related object" which is the loco.
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Varaction2 to test which loco is pulling the consist?

Post by AndersI »

Thanks! So, it was blindness - how could I miss that one? Seems to work exactly as I want (Yes, there's a very low percent chance that the Green Cargo trains have other containers loaded too):
Attachments
Example63.png
Example63.png (2.5 KiB) Viewed 1218 times
User avatar
The Irish
Tycoon
Tycoon
Posts: 2092
Joined: 14 Apr 2004 16:06
Location: Bonn, Germany
Contact:

Re: Varaction2 to test which loco is pulling the consist?

Post by The Irish »

Great looking sprites. I also like what you're planning here with Green Cargo. Very cool idea.
*** Ce French Train Set ***
*** Visit my transport related pictures on Flickr ***
ImageImageImageImageImage
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
"A committee is a group of men who individually can do nothing but as a group decide that nothing can be done" (Fred Allen 1894-1956 US radio comic).
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Semrush [Bot] and 16 guests