Class 91 Mk4 PO Coach script issues

N33

Train Photographer
I posted in the British Trainz forum about a month ago with this issue and no-one got back to me so asking here as well.

I've been having some issues with the Class 91 mk4 carriages by Peter Hicks in TS12 61388.

I've traced the bug to the coach naming script in the FO coach (kuid2:116035:10001:1).

It only occurs when there are more than 3 of them present in one session.

The following lines of code are causing the issue:

Code:
 if (vs[i-1].GetAsset().GetKUID().GetName() == GetAsset().GetKUID().GetName()) {                            
              if (i > 1 and vs[i-2].GetAsset().GetKUID().GetName() == GetAsset().GetKUID().GetName())

I'm clueless as to how to fix it and don't want to break it.

Any help on the matter would be greatly appreciated.

Cheers,

Johan :)

PS: Mod's move this if it's in the wrong section.
 
Hi Johan

The loco and coaches are scripted to put the correct letter on the end of each coach when they are assembled in the correct order. The correct makeup is : DVT, PO, PO, PO, SV, TOD, TO, TO, TO, TOE, Class 91. The DVT end is normally leading in the Up direction (towards King's Cross).

I corrected the errors a while back to get them to work in TS12 and looking at the config file for the PO it looks as though I deleted the reference to the script. Personally I find scripting rather a black art and wouldn't know where to start with the error but, as I create AI sessions only, my main concern was to get them to work with AI in TS12.

Regards

Brian
 
Hi Brian,

I had a feeling I'd need to delete the reference to the script. This does mean however that the coaches are no longer named. Oh well.

Thanks for your help and information on the correct lineup of the coaches :)

Cheers,

Johan :)
 
I had a little play with these earlier in TS12 61388, and while I did get the script error as above, it was only when I went into the interior view of the SV vehicle. I had set the SV up with the seated section facing the standard class as per the real thing, but this required it to be rotated in Trainz. After I'd gone into the interior view, the 91 cab view was the wrong way around. I'm wondering whether this is what is confusing the script, which is attempting to letter the coaches in order depending on postion of the DVT. I then tested it again with the SV vehicle rotated so seats were facing first class, no script error.

I did notice the DVT at rear had its wipers going no matter what the weather. The 91 was responding correctly.
 
-snip-

I did notice the DVT at rear had its wipers going no matter what the weather. The 91 was responding correctly.

Yep, that happens with me as well.

I'm wondering whether this is what is confusing the script, which is attempting to letter the coaches in order depending on postion of the DVT.


Looks like that might be the case after taking a look at the script again. Still unsure as to which parameters to change though :/

Cheers,

Johan :)
 
Back
Top