Is your locomotive not running?

Resolves an issue with old rolling stock in new versions of Trainz
Remove one line of code in the locomotive script GetMyTrain().SetHeadlightState(false);

example :

void SetLamps(int position, bool facing, bool spelne)
{
switch(position)
{
case S_NONE:
SetFXCoronaTexture("ppbc",null);
SetFXCoronaTexture("plbc",null);
SetFXCoronaTexture("psbc",null);
SetFXCoronaTexture("tpbc",null);
SetFXCoronaTexture("tlbc",null);
SetFXCoronaTexture("tsbc",null);
SetFXCoronaTexture("tpcc",null);
SetFXCoronaTexture("tlcc",null);
SetFXCoronaTexture("ppcc",null);
SetFXCoronaTexture("plcc",null);
SetMeshVisible("ppb1",false,0.0);
SetMeshVisible("plb1",false,0.0);
SetMeshVisible("psb1",false,0.0);
SetMeshVisible("tpb1",false,0.0);
SetMeshVisible("tlb1",false,0.0);
SetMeshVisible("tsb1",false,0.0);
SetMeshVisible("ppb2",false,0.0);
SetMeshVisible("plb2",false,0.0);
SetMeshVisible("psb2",false,0.0);
SetMeshVisible("tpb2",false,0.0);
SetMeshVisible("tlb2",false,0.0);
SetMeshVisible("tsb2",false,0.0);
SetMeshVisible("ppc",false,0.0);
SetMeshVisible("plc",false,0.0);
SetMeshVisible("tpc",false,0.0);
SetMeshVisible("tlc",false,0.0);
SetMeshVisible("ppb0",true,0.0);
SetMeshVisible("plb0",true,0.0);
SetMeshVisible("psb0",true,0.0);
SetMeshVisible("tpb0",true,0.0);
SetMeshVisible("tlb0",true,0.0);
SetMeshVisible("tsb0",true,0.0);
GetMyTrain().SetHeadlightState(false);
break;

case S_PC1:
if (facing)
{
if (spelne)
{
SetFXCoronaTexture("ppbc",biale);




best regards
Sebastian Babik
 
Last edited:
Back
Top