ForbodingAngel

Untitled

Apr 30th, 2014
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 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. StartMoving()
  59. {
  60. moving=1;
  61. }
  62.  
  63. StopMoving()
  64. {
  65. moving=0;
  66. }
  67.  
  68. MoveRate0()
  69. {
  70. flames=0;
  71. turn frontengines to x-axis <-90.000000> speed <150.000000>;
  72. turn rearengines to x-axis <-90.000000> speed <150.000000>;
  73. }
  74. MoveRate1()
  75. {
  76. flames=0;
  77. turn frontengines to x-axis <-70.005495> speed <150.000000>;
  78. turn rearengines to x-axis <-70.005495> speed <150.000000>;
  79. }
  80. MoveRate2()
  81. {
  82. flames=1;
  83. turn frontengines to x-axis <0.000000> speed <150.000000>;
  84. turn rearengines to x-axis <0.000000> speed <150.000000>;
  85. }
  86.  
  87.  
  88. Create()
  89. {
  90. // start-script Thrust();
  91. start-script SmokeUnit();
  92. }
  93.  
  94.  
  95. AimPrimary(heading, pitch) { // single weapon with 2 fires this tell sit what to do while aiming
  96. signal SIG_AIM;
  97. set-signal-mask SIG_AIM;
  98. return (1);
  99.  
  100. }
  101. FirePrimary()
  102. { // what do while firing, fires 1 barrel then the next , and resets
  103. }
  104.  
  105. AimFromPrimary(piecenum) { // where it aims the weapon from
  106. piecenum = base;
  107. }
  108.  
  109. QueryPrimary(piecenum) { // where the shot is called from
  110. piecenum = firepoint1;
  111. }
  112.  
  113. Killed(severity, corpsetype) // how it explodes
  114. {
  115. corpsetype = 1;
  116. explode base type EXPLODE_ON_HIT;
  117. explode frontengines type EXPLODE_ON_HIT;
  118. explode fengine1 type EXPLODE_ON_HIT;
  119. explode fengine2 type EXPLODE_ON_HIT;
  120. explode rearengines type EXPLODE_ON_HIT;
  121. explode rengine1 type EXPLODE_ON_HIT;
  122. explode rengine2 type EXPLODE_ON_HIT;
  123. }
Advertisement
Add Comment
Please, Sign In to add comment