Bolier explosion

Trainz_12_fan_100

yes thats my name
I am experimenting with boiler explosions and am slowly progressing

....
1. Can you use script programming in "kind bogey" ?
Does anybody know??

2. Of course there are ways to make the wheels rusty, but I think a more elegant solution
is to use 1. above.

I think I investigated a bogie script a while back and concluded it wasn't possible. So, I implemented a loco script that controls the visibility of bogie parts so I can partially implement different locations of the valve gear. Here is a segment of the code:

Code:
class Loco_840 isclass Locomotive
{


  // valve rods
  // left side
  define string ValverodLeftFwdForward = "valverod-fwd-left-forward";
  define string ValverodLeftFwdReverse = "valverod-fwd-left-reverse";
  define string ValverodLeftFwdNeutral = "valverod-fwd-left-neutral";
...
 // Global variables
  Asset myAsset;
  Train myTrain;
  bool  DeRailed = false;
  Bogey myBogie;

....
void InitialiseDriverTasks()
{
     myAsset = GetAsset();
     if(me.GetMyTrain())
     {
       sniffMyTrain();   // also sets myTrain


       Bogey[] bogies = GetBogeyList();
       myBogie = bogies[0];
  
       ...


} // InitialiseDriverTasks()
...

void ChangeDirection(int newDirection, int oldDirection) {


    if (newDirection == myTrain.TRACTION_NEUTRAL) {
         // change to neutral


     // hide previous meshes
     // left side valve rods
     if (oldDirection == myTrain.TRACTION_FORWARD) {
         
          //MB.Alert("Change to neutral from forward");
         
          // left and right valve rods
       myBogie.SetMeshVisible(ValverodLeftFwdForward, false, 0.0);
       myBogie.SetMeshVisible(ValverodLeftRearForward, false, 0.0);
       myBogie.SetMeshVisible(ValverodRightFwdForward, false, 0.0);
       myBogie.SetMeshVisible(ValverodRightRearForward, false, 0.0);
...
// valverods      
     myBogie.SetMeshVisible(ValverodLeftFwdNeutral, true, 0.0);
     myBogie.SetMeshVisible(ValverodLeftRearNeutral, true, 0.0);
     myBogie.SetMeshVisible(ValverodRightFwdNeutral, true, 0.0);
     myBogie.SetMeshVisible(ValverodRightRearNeutral, true, 0.0);

...

Basically, the loco (traincar) code hides or shows bogie parts as the position of the reverser changes from forward, to neutral and reverse. If you wanted to hide a normal bogie set and show the fire ravaged set then I believe you could do something like this.

My loco is in development so it isn't on the DLS.
I can definitely use this!
 
Back
Top