Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define TA // This is a TA script
- #include "sfxtype.h"
- #include "exptype.h"
- piece flare1, flare2, base, wing1, wing2, rearthrust;
- static-var Static_Var_1, statechg_DesiredState, statechg_StateChanging, Static_Var_4, bMoving;
- lua_UnitStoppedMoving()
- {
- return 0;
- }
- lua_UnitStartedMoving()
- {
- return 0;
- }
- activatescr()
- {
- move wing1 to x-axis [0.000000] now;
- move wing1 to x-axis [4.999985] speed [5.010010];
- move wing1 to z-axis [0.000000] now;
- move wing1 to z-axis [-1.374985] speed [1.377747];
- move wing2 to x-axis [0.000000] now;
- move wing2 to x-axis [-5.624985] speed [5.636215];
- move wing2 to z-axis [0.000000] now;
- move wing2 to z-axis [-1.499985] speed [1.502945];
- sleep 998;
- }
- deactivatescr()
- {
- move wing1 to x-axis [4.999985] now;
- move wing1 to x-axis [0.000000] speed [5.010010];
- move wing1 to z-axis [-1.374985] now;
- move wing1 to z-axis [0.000000] speed [1.377747];
- move wing2 to x-axis [-5.624985] now;
- move wing2 to x-axis [0.000000] speed [5.636215];
- move wing2 to z-axis [-1.499985] now;
- move wing2 to z-axis [0.000000] speed [1.502945];
- sleep 998;
- }
- SmokeUnit(healthpercent, sleeptime, smoketype)
- {
- while( get BUILD_PERCENT_LEFT )
- {
- sleep 500;
- }
- while( TRUE )
- {
- healthpercent = get HEALTH;
- if( healthpercent < 66 )
- {
- smoketype = 258;
- if( Rand( 1, 66 ) < healthpercent )
- {
- smoketype = 257;
- }
- emit-sfx smoketype from base;
- }
- sleeptime = healthpercent * 50;
- if( sleeptime < 200 )
- {
- sleeptime = 200;
- }
- sleep sleeptime;
- }
- }
- RequestState(requestedstate, currentstate)
- {
- if( statechg_StateChanging )
- {
- statechg_DesiredState = requestedstate;
- return (0);
- }
- statechg_StateChanging = TRUE;
- currentstate = statechg_DesiredState;
- statechg_DesiredState = requestedstate;
- while( statechg_DesiredState != currentstate )
- {
- if( statechg_DesiredState )
- {
- call-script deactivatescr();
- currentstate = 1;
- }
- else
- {
- call-script activatescr();
- currentstate = 0;
- }
- }
- statechg_StateChanging = FALSE;
- }
- Create()
- {
- Static_Var_1 = 0;
- statechg_DesiredState = TRUE;
- statechg_StateChanging = FALSE;
- //start-script Flamers();
- //start-script Crashing();
- start-script SmokeUnit();
- }
- Activate()
- {
- start-script RequestState(0);
- }
- Deactivate()
- {
- start-script RequestState(1);
- }
- StartMoving()
- {
- bMoving = TRUE;
- get PRINT(99,bMoving)
- call-script lua_UnitStartedMoving();
- }
- StopMoving()
- {
- bMoving = FALSE;
- get PRINT(9,bMoving)
- call-script lua_UnitStoppedMoving();
- }
- AimFromPrimary(piecenum)
- {
- piecenum = flare1;
- }
- AimPrimary(piecenum)
- {
- if( bMoving )
- {
- return (1);
- }
- }
- QueryPrimary(piecenum)
- {
- piecenum = flare1;
- }
- AimFromSecondary(piecenum)
- {
- piecenum = flare1;
- }
- AimSecondary(piecenum)
- {
- if( bMoving )
- {
- return (1);
- }
- }
- QuerySecondary(piecenum)
- {
- piecenum = flare2;
- }
- SweetSpot(piecenum)
- {
- piecenum = base;
- }
- Killed(severity, corpsetype)
- {
- //start-script Crashing();
- if( severity <= 25 )
- {
- corpsetype = 1;
- explode base type BITMAPONLY | BITMAP1;
- explode flare1 type BITMAPONLY | BITMAP2;
- explode flare2 type BITMAPONLY | BITMAP3;
- explode rearthrust type BITMAPONLY | BITMAP4;
- explode wing1 type BITMAPONLY | BITMAP5;
- explode wing2 type BITMAPONLY | BITMAP1;
- return (0);
- }
- if( severity <= 50 )
- {
- corpsetype = 2;
- explode base type BITMAPONLY | BITMAP1;
- explode flare1 type FALL | BITMAP2;
- explode flare2 type FALL | BITMAP3;
- explode rearthrust type FALL | BITMAP4;
- explode wing1 type BITMAPONLY | BITMAP5;
- explode wing2 type SHATTER | BITMAP1;
- return (0);
- }
- if( severity <= 99 )
- {
- corpsetype = 3;
- explode base type BITMAPONLY | BITMAP1;
- explode flare1 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
- explode flare2 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
- explode rearthrust type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
- explode wing1 type BITMAPONLY | BITMAP5;
- explode wing2 type SHATTER | BITMAP1;
- return (0);
- }
- corpsetype = 3;
- explode base type BITMAPONLY | BITMAP1;
- explode flare1 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
- explode flare2 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
- explode rearthrust type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
- explode wing1 type BITMAPONLY | BITMAP5;
- explode wing2 type SHATTER | EXPLODE_ON_HIT | BITMAP1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement