#define TA // This is a TA script #include "sfxtype.h" #include "exptype.h" piece flare, base, turret, barrel, sleeve, groundplane; static-var Static_Var_2, Static_Var_3, gun_1, Static_Var_5, Static_Var_6, Static_Var_7, Static_Var_8, Static_Var_9; // Signal definitions #define SIG_AIM 2 SmokeUnit(healthpercent, sleeptime, smoketype) { while( get BUILD_PERCENT_LEFT ) { sleep 400; } while( TRUE ) { healthpercent = get HEALTH; if( healthpercent < 66 ) { smoketype = 256 | 2; if( Rand( 1, 66 ) < healthpercent ) { smoketype = 256 | 1; } emit-sfx smoketype from flare; } sleeptime = healthpercent * 50; if( sleeptime < 200 ) { sleeptime = 200; } sleep sleeptime; } } MoveRate2() { if( Rand( 1, 5 ) == 1 AND ( !Static_Var_5 ) ) { Static_Var_5 = 1; turn base to x-axis <-15.000000> speed <10.000000>; turn groundplane to z-axis <240.000000> speed <120.000000>; wait-for-turn base around z-axis; turn base to x-axis <15.000000> speed <10.000000>; turn groundplane to z-axis <120.000000> speed <120.000000>; wait-for-turn base around z-axis; turn groundplane to z-axis <0.000000> speed <120.000000>; turn base to x-axis <0.000000> speed <10.000000>; wait-for-turn base around z-axis; turn groundplane to z-axis <240.000000> speed <120.000000>; turn base to x-axis <-15.000000> speed <10.000000>; wait-for-turn base around z-axis; turn base to x-axis <15.000000> speed <10.000000>; turn groundplane to z-axis <120.000000> speed <120.000000>; wait-for-turn base around z-axis; turn groundplane to z-axis <0.000000> speed <120.000000>; turn base to x-axis <0.000000> speed <10.000000>; move base to y-axis [0.000000] now; Static_Var_5 = 0; } } Create() { Static_Var_5 = 0; hide flare; Static_Var_2 = 1; set ARMORED to 1; start-script SmokeUnit(); } RestorePrimary() { sleep 5000; turn turret to y-axis <-1.000000> speed <1.000000>; turn sleeve to x-axis <-1.000000> speed <1.000000>; } AimPrimary(heading, pitch) { signal SIG_AIM; set-signal-mask SIG_AIM; turn turret to y-axis heading speed <1.000000>; turn sleeve to x-axis <-1.000000> - pitch speed <1.000000>; wait-for-turn turret around y-axis; wait-for-turn sleeve around x-axis; start-script RestorePrimary(); return (1); } FirePrimary() { show flare; sleep 150; hide flare; return (0); } QueryPrimary(piecenum) { piecenum = flare; } SweetSpot(piecenum) { piecenum = base; } Killed(severity, corpsetype) { hide flare; corpsetype = 3; explode base type FALL | EXPLODE_ON_HIT | SMOKE | BITMAP2; }