ForbodingAngel

Untitled

Apr 30th, 2014
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. #define TA // This is a TA script
  2.  
  3. #include "sfxtype.h"
  4. #include "exptype.h"
  5.  
  6. piece base, firepoint1, frontengines, fengine1, fengine2, rearengines, rengine1, rengine2;
  7.  
  8. static-var moving, flames, MissileTypeSelect;
  9.  
  10. #define jethtrail 1024+0
  11.  
  12. // Signal definitions
  13. #define SIG_AIM 2
  14.  
  15. SmokeUnit(healthpercent, sleeptime, smoketype)
  16. {
  17. while( get BUILD_PERCENT_LEFT )
  18. {
  19. sleep 400;
  20. }
  21. while( TRUE )
  22. {
  23. healthpercent = get HEALTH;
  24. if( healthpercent < 66 )
  25. {
  26. smoketype = 256 | 2;
  27. if( Rand( 1, 66 ) < healthpercent )
  28. {
  29. smoketype = 256 | 1;
  30. }
  31. emit-sfx 1025 from base;
  32. }
  33. sleeptime = healthpercent * 50;
  34. if( sleeptime < 200 )
  35. {
  36. sleeptime = 200;
  37. }
  38. sleep sleeptime;
  39. }
  40. }
  41.  
  42.  
  43. Thrust()
  44. {
  45. while( TRUE )
  46. {
  47. if (moving)
  48. {
  49. emit-sfx jethtrail from fengine1;
  50. emit-sfx jethtrail from fengine2;
  51. emit-sfx jethtrail from rengine1;
  52. emit-sfx jethtrail from rengine2;
  53. }
  54. sleep 5;
  55. }
  56. }
  57.  
  58. MissileType(select)
  59. {
  60. MissileTypeSelect = select;
  61. }
  62.  
  63. StartMoving()
  64. {
  65. moving=1;
  66. }
  67.  
  68. StopMoving()
  69. {
  70. moving=0;
  71. }
  72.  
  73. MoveRate0()
  74. {
  75. flames=0;
  76. turn frontengines to x-axis <-90.000000> speed <150.000000>;
  77. turn rearengines to x-axis <-90.000000> speed <150.000000>;
  78. }
  79. MoveRate1()
  80. {
  81. flames=0;
  82. turn frontengines to x-axis <-70.005495> speed <150.000000>;
  83. turn rearengines to x-axis <-70.005495> speed <150.000000>;
  84. }
  85. MoveRate2()
  86. {
  87. flames=1;
  88. turn frontengines to x-axis <0.000000> speed <150.000000>;
  89. turn rearengines to x-axis <0.000000> speed <150.000000>;
  90. }
  91.  
  92. AimWeapon1(heading, pitch) // single weapon with 2 fires this tell sit what to do while aiming
  93. {
  94. if(!MissileTypeSelect) return 0;
  95. signal SIG_AIM;
  96. set-signal-mask SIG_AIM;
  97. return (1);
  98. }
  99.  
  100. FireWeapon1() // what do while firing, fires 1 barrel then the next , and resets
  101. {
  102. }
  103.  
  104. AimFromWeapon1(piecenum) // where it aims the weapon from
  105. {
  106. piecenum = base;
  107. }
  108.  
  109. QueryWeapon1(piecenum) // where the shot is called from
  110. {
  111. piecenum = firepoint1;
  112. }
  113.  
  114. AimWeapon2(heading, pitch) // single weapon with 2 fires this tell sit what to do while aiming
  115. {
  116. if(MissileTypeSelect) return 0;
  117. signal SIG_AIM;
  118. set-signal-mask SIG_AIM;
  119. return (1);
  120. }
  121.  
  122. FireWeapon2() // what do while firing, fires 1 barrel then the next , and resets
  123. {
  124. }
  125.  
  126. AimFromWeapon2(piecenum) // where it aims the weapon from
  127. {
  128. piecenum = base;
  129. }
  130.  
  131. QueryWeapon2(piecenum) // where the shot is called from
  132. {
  133. piecenum = firepoint1;
  134. }
  135.  
  136. Create()
  137. {
  138. // start-script Thrust();
  139. start-script SmokeUnit();
  140. MissileTypeSelect = 1;
  141. }
  142.  
  143. Killed(severity, corpsetype) // how it explodes
  144. {
  145. corpsetype = 1;
  146. explode base type EXPLODE_ON_HIT;
  147. explode frontengines type EXPLODE_ON_HIT;
  148. explode fengine1 type EXPLODE_ON_HIT;
  149. explode fengine2 type EXPLODE_ON_HIT;
  150. explode rearengines type EXPLODE_ON_HIT;
  151. explode rengine1 type EXPLODE_ON_HIT;
  152. explode rengine2 type EXPLODE_ON_HIT;
  153. }
Advertisement
Add Comment
Please, Sign In to add comment