ForbodingAngel

Untitled

Apr 30th, 2014
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 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, PRINT;
  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.  
  93. Create()
  94. {
  95. // start-script Thrust();
  96. start-script SmokeUnit();
  97. MissileTypeSelect = 1;
  98. }
  99.  
  100.  
  101. AimPrimary(heading, pitch) { // single weapon with 2 fires this tell sit what to do while aiming
  102. get PRINT (MissileTypeSelect);
  103. if(!MissileTypeSelect) return 0;
  104. signal SIG_AIM;
  105. set-signal-mask SIG_AIM;
  106. return (1);
  107. }
  108.  
  109. FirePrimary() { // what do while firing, fires 1 barrel then the next , and resets
  110. }
  111.  
  112. AimFromPrimary(piecenum) { // where it aims the weapon from
  113. piecenum = base;
  114. }
  115.  
  116. QueryPrimary(piecenum) { // where the shot is called from
  117. piecenum = firepoint1;
  118. }
  119.  
  120. AimSecondary(heading, pitch) { // single weapon with 2 fires this tell sit what to do while aiming
  121. if(MissileTypeSelect) return 0;
  122. signal SIG_AIM;
  123. set-signal-mask SIG_AIM;
  124. return (1);
  125. }
  126.  
  127. FireSecondary() { // what do while firing, fires 1 barrel then the next , and resets
  128.  
  129. }
  130.  
  131. AimFromSecondary(piecenum) { // where it aims the weapon from
  132. piecenum = base;
  133. }
  134.  
  135. QuerySecondary(piecenum) { // where the shot is called from
  136. piecenum = firepoint1;
  137. }
  138.  
  139. Killed(severity, corpsetype) // how it explodes
  140. {
  141. corpsetype = 1;
  142. explode base type EXPLODE_ON_HIT;
  143. explode frontengines type EXPLODE_ON_HIT;
  144. explode fengine1 type EXPLODE_ON_HIT;
  145. explode fengine2 type EXPLODE_ON_HIT;
  146. explode rearengines type EXPLODE_ON_HIT;
  147. explode rengine1 type EXPLODE_ON_HIT;
  148. explode rengine2 type EXPLODE_ON_HIT;
  149. }
Advertisement
Add Comment
Please, Sign In to add comment