Back to the Vavoom Forum Archives
The 4th Class
Janis Legzdinsh
The 4th Class
The 4th Class
script 8 (void) // Testing the eastbound movement of the train { int a; // The starting tag (this may also be the/an argument) int b; // The starting line int c; // Times how long the cart takes int thrust; a = 248; // The "starting tag" is the front of the cart, the one facing the direction // it's heading. Also called the "front tag." The "back tag" always equals a + 8. b = 0; c = 0; thrust = 1; setlineblocking(3,ON); setlinetexture(3,SIDE_FRONT,TEXTURE_MIDDLE,"GATE04"); setlinetexture(3,SIDE_BACK,TEXTURE_MIDDLE,"GATE04"); while (a > 46) // Here the train starts moving. A represents the TID of a sector, b counts how many sectors have passed, and c counts how long the damn thing stays in motion. { a--; b++; floor_raiseinstant(a,19,19); changefloor(a,"F_067"); floor_lowerinstant(a+8,19,19); changefloor(a+8,"X_001"); if (ontrain == 1) // Ontrain is a map var { thrustthing(0,thrust); if (thrust == 1) { thrust++; } else {thrust--;} } if (b < 8) { delay(7); c+=7; } else if ((b >= 8) && (b < 16)) { delay(6); c+=6; } else if ((b >=16) && (b < 24)) { delay(5); c+=5; } else if ((b >=24) && (b < 32)) { delay(4); c+=4; } else if ((b >=32) && (b < 40)) { delay(3); c+=3; } else if ((b >=40) && (b < 48)) { delay(2); c+=2; } else { delay(1); c++; } } // By now the train has "left the map" if (ontrain == 1) { acs_execute(2,6,0,0,0); teleport_newmap(6,0); } // Thus there will be another train in the next level }Crashes about halfway through while loop.
Janis Legzdinsh
The 4th Class
Firebrand
The 4th Class
Crimson Wizard
Firebrand
Crimson Wizard