Advertisement
Guest User

absolutely broken pitch tonk code part 0 (ZScript)

a guest
Oct 27th, 2020
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 17.86 KB | None | 0 0
  1. //const int vehicle_Angle0 = 256;
  2. //const int vehicle_Angle1 = 360;
  3. //const int vehicle_Angle2 = 128;
  4.  
  5.  
  6. //------------------------------------------------------------------------------
  7. //CRASHES
  8. //------------------------------------------------------------------------------
  9. Class CrashTankIntotheGround1 : Actor
  10. {
  11. Default
  12. {
  13.     SeeSound "none";
  14.     DeathSound "none";
  15.     Decal "None";
  16.     Damagetype "Stomp";
  17.     Gravity 1.0;
  18.     +FORCERADIUSDMG;
  19.     Speed 1;
  20. }
  21.     States
  22.     {
  23.     Spawn:
  24.         TNT1 A 0;
  25.         Goto Death;
  26.     Death:
  27.         TNT1 A 0;
  28.         TNT1 A 0; //A_Explode(5000, 130, 0);
  29.         TNT1 A 1;
  30.         Stop;
  31.     }
  32. }
  33.  
  34. Class CrashTankIntotheGround2 : CrashTankIntotheGround1
  35. {
  36. Default
  37. {
  38.     Damagetype "Kick";
  39. }
  40.     States
  41.     {
  42.     Spawn:
  43.         TNT1 A 0;
  44.         Goto Death;
  45.     Death:
  46.         TNT1 A 0;
  47.         TNT1 A 0; //A_Explode(30, 220, 0);
  48.         TNT1 A 1;
  49.         Stop;
  50.     }
  51. }
  52.  
  53. //------------------------------------------------------------------------------
  54. //WITH TURRET
  55. //------------------------------------------------------------------------------
  56. Class MT_PitchFrontToken : Inventory
  57. {
  58. Default
  59. {
  60. Inventory.Amount 1;
  61. Inventory.MaxAmount 100;
  62. }
  63. }
  64.  
  65. Class MT_PitchBackToken : Inventory
  66. {
  67. Default
  68. {
  69. Inventory.Amount 1;
  70. Inventory.MaxAmount 100;
  71. }
  72. }
  73.  
  74. Class MT_PitchShotgun : Inventory
  75. {
  76. Default
  77. {
  78. Inventory.Amount 1;
  79. Inventory.MaxAmount 10;
  80. }
  81. }
  82.  
  83. Class MT_PitchMP40 : MT_PitchShotgun
  84. {
  85. Default
  86. {
  87. Inventory.Amount 1;
  88. Inventory.MaxAmount 10;
  89. }
  90. }
  91.  
  92.  
  93. Class CheckIfFloating: CheckPitchFront
  94. {
  95. States
  96.     {
  97.         Spawn:
  98.             TNT1 A 0;
  99.             TNT1 A 0 A_GiveToTarget("MT_PitchShotgun", 1);
  100.             EBAR A 1;
  101.             Stop;
  102.         IsOverSOmething:
  103.         Death:
  104.         Xdeath:
  105.             TNT1 A 0;
  106.             EBAR A 1;
  107.             Stop;
  108.         }
  109. }
  110.  
  111. Class CheckPitchCenter: CheckPitchFront
  112. {
  113. Default
  114. {
  115. Radius 32;
  116. Height 2;
  117. Speed 30;
  118. Damage 0;
  119. Scale 0.25;
  120. Renderstyle "Add";
  121. Species "TankPlayer";
  122. }
  123. States
  124.     {
  125.         Spawn:
  126.             TNT1 A 0;
  127.             TNT1 A 0 A_GiveToTarget("MT_PitchShotgun", 1);
  128.             //TNT1 A 0 A_RadiusGive("MT_PitchShotgun", 8, RGF_PLAYERS, 1);
  129.             EBAR B 1;
  130.             Stop;
  131.         Death:
  132.             TNT1 A 0;
  133.             Stop;
  134.         Xdeath:
  135.             TNT1 A 0;
  136.             TNT1 A 0 A_GiveToTarget("MT_PitchMP40", 1);
  137.             //TNT1 A 0 A_RadiusGive("MT_PitchMP40", 8, RGF_PLAYERS, 1);
  138.             EBAR A 1;
  139.             Stop;
  140.             }
  141. }
  142.  
  143.  
  144.  
  145. Class CheckPitchRunOver: CheckPitchCenter
  146. {
  147. Default
  148. {
  149. Speed 50;
  150. }
  151. States
  152.     {
  153.         Spawn:
  154.             TNT1 A 0;
  155.             TNT1 A 1;
  156.             Stop;
  157.         Death:
  158.             TNT1 A 0;
  159.             Stop;
  160.         Xdeath:
  161.             TNT1 A 0;
  162.             TNT1 A 0 A_GiveToTarget("MT_PitchBackToken", 6);
  163.             //TNT1 A 0 A_RadiusGive("MT_PitchBackToken", 8, RGF_PLAYERS, 6);
  164.             TNT1 A 0;
  165.             Stop;
  166.             }
  167. }
  168.  
  169.  
  170. Class CheckIfOn3DFloor: CheckPitchCenter
  171. {
  172. Default
  173. {
  174. Speed 9;
  175. }
  176. States
  177.     {
  178.         Spawn:
  179.             TNT1 A 0;
  180.             TNT1 A 0;
  181.             TNT1 A 0 A_GiveToTarget("MT_PitchMP40", 1);
  182.             //TNT1 A 0 A_RadiusGive("MT_PitchMP40", 8, RGF_PLAYERS, 1);
  183.             EBAR A 1;
  184.             Stop;
  185.         XDeath:
  186.             TNT1 A 0;
  187.             Stop;
  188.         Death:
  189.             TNT1 A 0;
  190.             Stop;
  191.             }
  192. }
  193.  
  194. Class CheckPitchFront : Actor
  195. {
  196. Default
  197. {
  198. PROJECTILE;
  199. +MISSILE;
  200. Radius 12;
  201. Height 4;
  202. Speed 0;
  203. +THRUSPECIES;
  204. Species "TankPlayer";
  205. +DONTSPLASH;
  206. -EXPLODEONWATER;
  207. Scale 0.3;
  208. Renderstyle "Add";
  209. }
  210. States
  211.     {
  212.         Crash:
  213.         Spawn:
  214.             TNT1 A 0;
  215.             TNT1 A 0 A_GiveToTarget("MT_PitchFrontToken", 1);
  216.             SPRA C 1;
  217.             Stop;
  218.         IsOverSomething:
  219.         Death:
  220.         Xdeath:
  221.             SPRA AA 1;
  222.             Stop;
  223.             }
  224. }
  225.  
  226. Class CheckPitchBack: CheckPitchFront
  227. {
  228. States
  229.     {
  230.         Crash:
  231.         Spawn:
  232.             TNT1 A 0;
  233.             TNT1 A 0 A_GiveToTarget("MT_PitchBackToken", 1);
  234.             SPRA C 1;
  235.             Stop;
  236.         IsOverSomething:
  237.         Death:
  238.         Xdeath:
  239.             TNT1 A 0;
  240.             SPRA AA 1;
  241.             Stop;
  242.         }
  243. }
  244.  
  245. Class MT_ChassisBase : Actor
  246. {
  247. int user_chassisangle;
  248. int user_chassispitch;
  249. int user_chassispitch_old;
  250. const chassis_spawnflag = SXF_ABSOLUTEVELOCITY | SXF_ABSOLUTEANGLE;
  251. const chassis_warpflag = WARPF_ABSOLUTEANGLE;
  252. Default
  253. {
  254. +THRUACTORS;
  255. +NOTIMEFREEZE;
  256. +CLIENTSIDEONLY;
  257. +FLOORCLIP;
  258. +NOGRAVITY;
  259. +FIXMAPTHINGPOS;
  260. +DONTINTERPOLATE;
  261. -FLOORCLIP;
  262. -FLOAT;
  263. Mass 99999;
  264. Radius 0;
  265. Height 0;
  266. Gravity 0;
  267. }
  268. States
  269. {
  270. Spawn:
  271. TNK1 A 1;
  272. TNK1 B 1;
  273. TNK1 C 1;
  274. Stop;
  275. }}
  276.  
  277. Class MT_HeavyTank_Chassis : MT_ChassisBase
  278. {
  279.     States
  280.     {
  281.     Spawn:
  282.         TNT1 A 0;
  283.         TNT1 A 0 {user_chassisangle = 0;}
  284.         TNT1 A 0 {user_chassispitch = 0;}
  285.         TNT1 A 0 {user_chassisangle = CallACS("MT_GetVehicleRotation");}
  286.         TNT1 A 1;
  287.         Goto Spawn2;
  288.  
  289.     Spawn2:
  290.         TNK1 A 1 A_Warp(AAPTR_TARGET, 0, 0, 0, user_chassisangle, chassis_warpflag, "Stay");
  291.         Goto Stay;
  292.  
  293.     Stay:
  294.         "####" "#" 0 A_JumpIfInventory("MT_MorphVCrewToken", 1, "Blank", AAPTR_TARGET);
  295.         "####" "#" 0 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag);
  296.         //PITCH CHECK
  297.         "####" "#" 0 A_CustomMissile("CheckPitchCenter", 0, 0, 0, 2, 0);
  298.         "####" "#" 0 A_CustomMissile("CheckPitchCenter", 0, 0, 180, 2, 0);
  299.         "####" "#" 0 A_CustomMissile("CheckIfOn3DFloor", -8, 0, 0, 2, 0);
  300.         "####" "#" 0 A_CustomMissile("CheckIfOn3DFloor", -16, 0, 0, 2, 0);
  301.        
  302.         "####" "#" 0 A_SpawnItemEx("CheckPitchFront", 19, 12, -2, 0, 0, 0, 0);
  303.         "####" "#" 0 A_SpawnItemEx("CheckPitchFront", 19, -12, -2, 0, 0, 0, 0);
  304.         "####" "#" 0 A_SpawnItemEx("CheckPitchFront", 19, 0, -2, 0, 0, 0, 0);
  305.  
  306.         "####" "#" 0 A_SpawnItemEx("CheckPitchBack", -19, 12, -2, 0, 0, 0, 0);
  307.         "####" "#" 0 A_SpawnItemEx("CheckPitchBack", -19, -12, -2, 0, 0, 0, 0);
  308.         "####" "#" 0 A_SpawnItemEx("CheckPitchBack", -19, 0, -2, 0, 0, 0, 0);
  309.        
  310.         "####" "#" 0 A_SpawnItemEx("CheckPitchBack", -19, 12, -10, 0, 0, 0, 0);
  311.         "####" "#" 0 A_SpawnItemEx("CheckPitchBack", -19, -12, -10, 0, 0, 0, 0);
  312.         "####" "#" 0 A_SpawnItemEx("CheckPitchBack", -19, 0, -10, 0, 0, 0, 0);
  313.  
  314.         "####" "#" 0 A_JumpIfInventory("MT_PitchMP40", 1, "PitchCheck");
  315.         "####" "#" 0 A_JumpIfInventory("MT_PitchFrontToken", 3, "PitchCheck");
  316.         "####" "#" 0 A_JumpIfInventory("MT_PitchBackToken", 3, "PitchCheck");
  317.         //END PITCH CHECK
  318.     Movement:
  319.         "####" "#" 0 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag);
  320.         "####" "#" 0 A_JumpIfInventory("Reverse", 1, "MoveB1", AAPTR_TARGET);
  321.         "####" "#" 0 A_JumpIfInventory("Accelerate", 1, "MoveF1", AAPTR_TARGET);
  322.         "####" "#" 0 A_JumpIfInventory("TurnLeft", 1, "MoveF1", AAPTR_TARGET);
  323.         "####" "#" 0 A_JumpIfInventory("TurnRight", 1, "MoveF1", AAPTR_TARGET);
  324.         "####" "#" 1;
  325.         loop;
  326.        
  327.     //CHECK PITCH
  328.     PitchCheck:
  329.         "####" "#" 0;
  330.        
  331.         "####" "#" 0 {
  332.         A_Log("SHOTGUN");
  333.         A_LogInt(CountInv("MT_PitchShotgun"));
  334.         A_Log("MP40");
  335.         A_LogInt(CountInv("MT_PitchMP40"));
  336.         A_Log("BACK");
  337.         A_LogInt(CountInv("MT_PitchBackToken"));
  338.         A_Log("FRONT");
  339.         A_LogInt(CountInv("MT_PitchFrontToken"));
  340.         }
  341.  
  342.         //CLEAR
  343.         "####" "#" 0 A_JumpIfInventory("MT_PitchMP40", 1, "PitchClear");
  344.         //FRONT
  345.         "####" "#" 0 A_JumpIfInventory("MT_PitchBackToken", 6, "PitchFront");
  346.         "####" "#" 0 A_JumpIfInventory("MT_PitchBackToken", 3, "PitchFront");
  347.         "####" "#" 0 A_JumpIfInventory("MT_PitchFrontToken", 6, "PitchRear");
  348.         "####" "#" 0 A_JumpIfInventory("MT_PitchFrontToken", 3, "PitchRear");
  349.         Goto Movement;
  350.        
  351.     //PITCH UP
  352.     PitchFront:
  353.         "####" "#" 0 A_JumpIfInventory("MT_PitchShotgun", 3, "PitchRear");
  354.         "####" "#" 0 A_JumpIfInventory("MT_PitchMP40", 1, "PitchClear");
  355.         "####" "#" 0 A_Log("PITCH FRONT");
  356.         "####" "#" 0 {user_chassispitch = 3;}
  357.         "####" "#" 0 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag, null, 0, 0, user_chassispitch);
  358.         "####" "#" 1;
  359.         Goto ItemClear;
  360.  
  361.     //PITCH DOWN
  362.     PitchRear:
  363.         "####" "#" 0 A_JumpIfInventory("MT_PitchMP40", 1, "PitchClear");
  364.         "####" "#" 0 A_Log("PITCH REAR");
  365.         "####" "#" 0 {user_chassispitch = -3;}
  366.         "####" "#" 0 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag, null, 0, 0, user_chassispitch);
  367.         "####" "#" 1;
  368.         Goto ItemClear;
  369.  
  370.     //PITCH CLEAR      
  371.     PitchClear:
  372.         "####" "#" 0 {
  373.             user_chassispitch = 0; 
  374.             user_chassispitch_old = MTA_ResetPitch(pitch);
  375.             /*
  376.             if (pitch < 0)
  377.             {
  378.                 user_chassispitch_old = pitch - (pitch * 2);
  379.             }
  380.            
  381.             else if (pitch > 0)
  382.             {
  383.                 user_chassispitch_old = pitch + (pitch * 2);
  384.             }
  385.            
  386.             else
  387.             {
  388.                 user_chassispitch_old = 0;
  389.             }          
  390.             */
  391.             A_TakeInventory("MT_PitchShotgun", 999);
  392.             A_TakeInventory("MT_PitchMP40", 999);
  393.             A_TakeInventory("MT_PitchBackToken", 999);
  394.             A_TakeInventory("MT_PitchFrontToken", 999);
  395.         }
  396.         //"####" "#" 0 A_Log("PITCH CLEAR");
  397.         "####" "#" 0 A_LogInt(user_chassispitch_old);
  398.         "####" "#" 0 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag, null, 0, 0, user_chassispitch_old);
  399.         "####" A 1;
  400.         Goto Movement;
  401.    
  402.     ItemClear:
  403.         "####" "#" 0 {
  404.             //user_chassispitch_old = user_chassispitch;
  405.             //user_chassispitch = 0;
  406.             A_TakeInventory("MT_PitchShotgun", 999);
  407.             A_TakeInventory("MT_PitchMP40", 999);
  408.             A_TakeInventory("MT_PitchBackToken", 999);
  409.             A_TakeInventory("MT_PitchFrontToken", 999);
  410.         }
  411.         "####" "#" 0 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag, null, 0, 0, user_chassispitch);
  412.         Goto Movement;
  413.    
  414.     //FORWARD
  415.     MoveF1:
  416.         "####" B 1 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag);
  417.     MoveF2:
  418.         "####" C 1 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag);
  419.     MoveF3:
  420.         "####" D 1 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag);
  421.         Goto Stay;
  422.        
  423.     //BACKWARD
  424.     MoveB1:
  425.         "####" D 1 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag);
  426.     MoveB2:
  427.         "####" C 1 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag);
  428.     MoveB3:
  429.         "####" B 1 A_Warp(AAPTR_TARGET, 0, 0, 0, CallACS("MT_GetVehicleRotation"), chassis_warpflag);
  430.         Goto Stay;
  431.        
  432.     //TURN LEFT
  433.  
  434.     //TURN RIGHT
  435.  
  436.     Blank:
  437.         TNT1 A 1;
  438.         Goto Stay;
  439.     }  
  440. }
  441.  
  442.  
  443. Class MT_BaseTank : PlayerPawn
  444. {
  445. const chassis_spawnflag = SXF_ABSOLUTEVELOCITY + SXF_ABSOLUTEANGLE + SXF_TRANSFERPITCH;
  446. const t_turnrate = 45; //tics turnrate
  447. const t_turnrate_move = 50; //tics turn rate + accel
  448. const turnrate = 4;
  449. const turnrate_move = 3;
  450. const accelerate = 1;
  451. const reverse = 1;
  452. int user_chassisangle;
  453.  
  454. Default
  455. {
  456. player.DisplayName "BASE TANK";
  457. player.viewheight 25;
  458. player.attackzoffset 13;
  459. player.forwardmove 0;
  460. player.sidemove 0;
  461. player.jumpz 0;
  462. player.face "TKF";
  463. player.maxhealth 1600;
  464. health 1600;
  465. Species "TankPlayer";
  466. Player.SoundClass "mt_vehicle";
  467. MaxStepHeight 24;
  468. Speed 0;
  469. Radius 16;
  470. Height 20;
  471. Mass 1000000;
  472. PainChance 128;
  473. Speed 0.0;
  474. BloodType "TankBlood", "TankBlood", "TankBlood";
  475. -FLOORCLIP
  476. Player.ColorRange 112, 127;
  477. //Internal stuff, very important
  478. Player.StartItem "MT_ClassToken"              ,1;
  479. Player.StartItem "MHTA1_Token"                ,1;
  480. Player.StartItem "MTU_SupplyBox_2"            ,1;
  481. Player.StartItem "MT_Subgun_Slot"             ,1;
  482. Player.StartItem "MT_AmmoSwitcher"            ,1;
  483. Player.StartItem "MT_AmmoSwitcher_Reverse"    ,1;
  484. Player.StartItem "MT_SubgunSwitcher"          ,1;
  485. Player.Startitem "MT_SubgunSwitcher_Reverse"  ,1;
  486. Player.Startitem "MT_Searchlight"             ,1;
  487. Player.StartItem "MT_Nightvision_MK1"         ,1;
  488. Player.StartItem "MT_ChaseCamera_MK1"         ,1;
  489. Player.StartItem "MT_PeriscopeItem"           ,1;
  490. //Lockers
  491. //Weapons
  492. Player.StartItem "MT_105mmCannon"           ,1;
  493. Player.StartItem "Multi_Purpose_Device"       ,1;
  494. //Ammo
  495. Player.Startitem "MT_75x500mmHE"                ,20;
  496. Player.Startitem "MT_75x500mmAP"                ,40;
  497. Player.Startitem "A_7u62x54mmR"                 ,2000;
  498. //Items
  499. //  Player.startitem "Item_GrenadePod_Smoke"        ,8
  500. Player.startitem "Item_GrenadePod_SSS"          ,1;
  501. Player.startitem "Item_GrenadePod_Illuminating" ,2;
  502. Player.startitem "MT_Item_GrenadePod_Flare"     ,30;
  503. Player.Startitem "MT_GrenadePod_Explosive"      ,20;
  504.  
  505. //MT Damage types
  506. DamageFactor "PiercingExplosive" ,0.75;
  507. DamageFactor "Piercing"          ,0.8;
  508. DamageFactor "Frag"              ,0.05;
  509. DamageFactor "Bullet"            ,0.15;
  510. DamageFactor "Acid"              ,0.5;
  511. DamageFactor "Chemical"          ,0.5;
  512. DamageFactor "Build"             ,0;
  513. //Other Damage types
  514. DamageFactor "Normal"            ,0.8;
  515. DamageFactor "Extreme"           ,0.8;
  516. DamageFactor "Drowning"          ,0.0;
  517. DamageFactor "Falling"           ,0.1;
  518. DamageFactor "Ice"               ,0.2;
  519. DamageFactor "Fire"              ,0.1;
  520. Damagefactor "stomp"             ,0;
  521. DamageFactor "Energy"            ,0.85;
  522. DamageFactor "Radiation"         ,0.0;
  523. DamageFactor "Nuclear"           ,0.9;
  524. DamageFactor "Explosive"         ,0.25;
  525. DamageFactor "Buckshot"          ,0;
  526. DamageFactor "Reclaim"           ,0.9;
  527. DamageFactor "Poison"            ,0;
  528. DamageFactor "PoisonCloud"       ,0;
  529. DamageFactor "Electric"          ,0.75;
  530. }
  531.     States
  532.     {
  533.     Pain:
  534.         "####" A 0;
  535.         "####" A 1 A_Pain;
  536.         Goto CheckIfStillMoves;
  537.  
  538.     Blank:
  539.         TNT1 A 0;
  540.         Goto Stay;
  541.  
  542.     //
  543.     //INITALIZATION
  544.     //
  545.     Spawn:
  546.         TNK1 A 0;
  547.         TNK1 A 0; //A_SetUserVar("user_chassisangle", CallACS("MTACS_Chassis_Init"))
  548.         TNK1 A 0;
  549.         TNK1 A 0 ThrustThingZ(0, 100, -1, 1);
  550.         TNK1 A 0 A_PlaySound("TankEngine/Start", 0, 0.8, 0, ATTN_IDLE);
  551.         TNK1 A 0
  552.         {
  553.             if ( GetCVAR("mtccvar_startup_noise") == 1 )
  554.             {
  555.                 A_PlaySound("GCrew/MissionStart");
  556.             }
  557.         }
  558.         TNK1 A 1;
  559.     Spawn2:
  560.         TNK1 A 0; //A_SetUserVar("user_chassisangle", CallACS("MTACS_Chassis_Init"))
  561.         TNK1 A 0; //A_SetUserVar("user_chassisangle", CallACS("MT_SetVehicleRotation"))
  562.         TNK1 A 0 {int user_chassisangle = 0;}
  563.         TNK1 A 0 A_SpawnItemEx ("MT_HeavyTank_Chassis" , 0, 0, 0, 0, 0, 0, user_chassisangle, chassis_spawnflag);
  564.         TNK1 A 1;
  565.         Goto Stay;
  566.    
  567.     DoNothing:
  568.         "####" A 1;
  569.         Goto Stay;
  570.        
  571.     //
  572.     //CHANGE MODEL/VISUAL
  573.     //
  574.  
  575.  
  576.     //
  577.     //DRIVE
  578.     //
  579.     CheckIfStillMoves:
  580.         "####" A 0;
  581.         "####" A 0 A_JumpIfInventory("ImCrafting", 1, "DoNothing");
  582.         "####" A 0 A_JumpIfInventory("Accelerate", 1, "Accelerate");
  583.         "####" A 0 A_JumpIfInventory("Reverse", 1, "Reverse");
  584.         "####" A 0 A_JumpIfInventory("TurnLeft", 1, "TurnLeft");
  585.         "####" A 0 A_JumpIfInventory("TurnRight", 1, "TurnRight");
  586.         "####" AAA 1;
  587.         "####" A 0 A_StopSound(5);
  588.         "####" A 0 A_PlaySound("Treads/Mid", 2);
  589.         Goto Stay; 
  590.  
  591.     CheckIfStillMoves2:
  592.         "####" A 0;
  593.         "####" A 0 A_JumpIfInventory("ImCrafting", 1, "DoNothing");
  594.         "####" A 0 A_JumpIfInventory("Accelerate", 1, "Accelerate");
  595.         "####" A 0 A_JumpIfInventory("Reverse", 1, "Reverse");
  596.         "####" A 0 A_JumpIfInventory("TurnLeft", 1, "TurnLeft");
  597.         "####" A 0 A_JumpIfInventory("TurnRight", 1, "TurnRight");
  598.         "####" AAA 1;
  599.         "####" A 0 A_StopSound(5);
  600.         "####" A 0 A_PlaySound("Treads/Left", 2);
  601.         Goto Stay; 
  602.    
  603.     Stay:
  604.         "####" A 0 A_JumpIfInventory("Reverse", 1, "Reverse");
  605.         "####" A 0 A_JumpIfInventory("Accelerate", 1, "Accelerate");
  606.         "####" A 0 A_JumpIfInventory("TurnLeft", 1, "TurnLeft");
  607.         "####" A 0 A_JumpIfInventory("TurnRight", 1, "TurnRight");
  608.         "####" A 1;
  609.         Goto Stay;
  610.        
  611.     Accelerate:
  612.         "####" A 0 {user_chassisangle = CallACS("MT_GetVehicleRotation");}
  613.         "####" A 0 A_PlaySound("Treads/Forward", 5, 1, 1);
  614.         "####" A 0 A_JumpIf(velz < 0, "Falling");
  615.         "####" A 1;
  616.         Goto CheckIfStillMoves;
  617.  
  618.     Reverse:
  619.         "####" A 0 {user_chassisangle = CallACS("MT_GetVehicleRotation");}
  620.         "####" A 0 A_PlaySound("Treads/Backward", 5, 1, 1);
  621.         "####" A 0 A_JumpIf(velz < 0, "Falling");
  622.         "####" A 1;
  623.         Goto CheckIfStillMoves;
  624.        
  625.     TurnRight:
  626.         "####" A 0 {user_chassisangle = CallACS("MT_GetVehicleRotation");}
  627.         "####" A 0 A_PlaySound("Treads/Left", 5, 1, 1);
  628.         "####" A 0 A_TakeInventory("TurnLeft", 999);
  629.         "####" A 0 A_TakeInventory("TurnRight", 999);
  630.         "####" A 0 A_JumpIf(velz < 0, "Falling");
  631.         "####" A 1;
  632.         Goto CheckIfStillMoves2;
  633.  
  634.     TurnLeft:      
  635.         "####" A 0 {user_chassisangle = CallACS("MT_GetVehicleRotation");}
  636.         "####" A 0 A_PlaySound("Treads/Right", 5, 1, 1);
  637.         "####" A 0 A_TakeInventory("TurnLeft", 999);
  638.         "####" A 0 A_TakeInventory("TurnRight", 999);
  639.         "####" A 0 A_JumpIf(velz < 0, "Falling");
  640.         "####" A 1;
  641.         Goto CheckIfStillMoves2;
  642.  
  643.  
  644.     //
  645.     //FALLING
  646.     //         
  647.     Falling:
  648.         "####" A 0;
  649.         "####" A 0 A_CheckFloor("CheckIfStillMoves");
  650.    
  651.     FallingForReal:
  652.         "####" A 0;
  653.         "####" A 1;
  654.         "####" A 0 A_JumpIF(velz == 0, "CrashIntoGround");
  655.         "####" A 0 A_GiveInventory("VehicleFallingCount", 1);
  656.         Loop;
  657.        
  658.     CrashIntoGround:
  659.         "####" A 0;
  660.         "####" A 0 A_JumpIfinventory("VehicleFallingCount", 10, "CrashIntoGroundViolently");
  661.         "####" A 1;
  662.         "####" A 0 A_SpawnItem("CrashTankIntotheGround1");
  663.         "####" A 0 A_SpawnItem("CrashTankIntotheGround2");
  664.         "####" A 0; //A_SpawnItemEx ("LargeMassWaterImpact", 0, 0, -10)
  665.         "####" A 0; //Radius_Quake(1, 6, 0, 4, 0)
  666.         "####" A 0 A_PlaySound("V_LightCrash", 2);
  667.         "####" A 0 A_TakeInventory("VehicleFallingCount", 9999);
  668.         Goto Stay;
  669.        
  670.     CrashIntoGroundViolently:
  671.         "####" A 0;
  672.         "####" A 1;
  673.         "####" A 0 A_SpawnItem("CrashTankIntotheGround1");
  674.         "####" A 0 A_SpawnItem("CrashTankIntotheGround2");
  675.        
  676.         "####" A 0; //A_SpawnItemEx ("ExplosionSplashSpawner", 0, 0, -10)
  677.        
  678.         "####" A 0; //Radius_Quake(8, 24, 0, 4, 0)
  679.         "####" A 0 A_PlaySound("V_LightCrash", 1);
  680.         "####" A 0 A_PlaySound("V_MediumCrash", 2);
  681.         "####" AAAA 0; //A_CustomMissile ("ExplosionSmoke", 0, 0, random (0, 360), 2, random (0, 360))
  682.         "####" A 0 A_TakeInventory("VehicleFallingCount", 9999);
  683.         "####" A 0 A_SetPitch(-8.0 + pitch);
  684.         "####" A 1;
  685.         "####" A 0 A_SetPitch(4.0 + pitch);
  686.         "####" A 1;
  687.         "####" A 0 A_SetPitch(4.0 + pitch);
  688.         Goto Stay;     
  689.     //
  690.     //KILLED/DESTROYED
  691.     // 
  692.     Death: 
  693.     XDeath:
  694.         "####" A 1;
  695.         "####" A 0; //A_SpawnItem("BigExplosion1112")
  696.         "####" A 0 A_PlaySound("weapons/explode");
  697.         "####" A 0 A_PlaySound("EXPLOSIO", 3);
  698.         "####" A 0 A_Scream;
  699.         "####" A 0 A_NoBlocking;
  700.         "####" AAAAAA 0; // A_CustomMissile ("MetalTrashParticle1", 96, 0, random (0, 360), 2, random (0, 180))
  701.         "####" AAAAAA 0; // A_CustomMissile ("MetalTrashParticle2", 96, 0, random (0, 360), 2, random (0, 180))
  702.         "####" AAAAAAAAA 0; // A_CustomMissile ("GlassShard", 96, 0, random (0, 360), 2, random (0, 360))
  703.         "####" A 0 A_Explode(100, 250);
  704.         "####" A 5;
  705.         "####" A 100;
  706.         "####" A -1;
  707.         Stop;
  708.     }  
  709.    
  710. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement