Skip to content

Commit 1521cc2

Browse files
committed
Rework T2 Obliterator
1 parent c1591a9 commit 1521cc2

17 files changed

+185
-335
lines changed

luaui/configs/defensive_range_defs.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ modConfig["TA"]["unitList"] =
138138
tllhltns = { weapons = { 1 } },
139139
tlllrpt = { weapons = { 1 } },
140140
tllobliterator = { weapons = { 1 } },
141-
tllobliterator1 = { weapons = { 1 } },
141+
tll_obliterator2 = { weapons = { 1 } },
142142
tll_immolator = { weapons = { 1 } },
143143
tllarch = { weapons = { 1 } },
144144
tll_hydre1 = { weapons = { 1 } },

objects3d/tll/tll_obliterator2.s3o

177 KB
Binary file not shown.
18.5 KB
Binary file not shown.

objects3d/tll/tllobliterator1.s3o

-35 KB
Binary file not shown.
-18.8 KB
Binary file not shown.

scripts/tll_obliterator2.bos

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
#define TA // This is a TA script
2+
3+
#include "sfxtype.h"
4+
#include "exptype.h"
5+
6+
piece base, body, turret, lminigun, rminigun, sleeves, rflare, lflare,
7+
g1, g2, g3, g4, g5, g6, g7, g8;
8+
9+
static-var gun_1;
10+
11+
// Signal definitions
12+
#define SIG_AIM 2
13+
#define SIG_AIM_2 4
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 smoketype from base;
32+
}
33+
sleeptime = healthpercent * 50;
34+
if( sleeptime < 200 )
35+
{
36+
sleeptime = 200;
37+
}
38+
sleep sleeptime;
39+
}
40+
}
41+
42+
Create()
43+
{
44+
gun_1 = 0;
45+
start-script SmokeUnit();
46+
}
47+
48+
AimPrimary(heading, pitch)
49+
{
50+
signal SIG_AIM;
51+
set-signal-mask SIG_AIM;
52+
turn turret to y-axis heading speed <45.000000>;
53+
turn sleeves to x-axis <0.> - pitch speed <30.000000>;
54+
wait-for-turn turret around y-axis;
55+
wait-for-turn sleeves around x-axis;
56+
return (1);
57+
}
58+
59+
FirePrimary()
60+
{
61+
if( gun_1 == 0 )
62+
{
63+
turn rminigun to z-axis <0.000000> now;
64+
turn rminigun to z-axis <90.000000> speed <240.000000>;
65+
sleep 100;
66+
}
67+
if( gun_1 == 1 )
68+
{
69+
turn lminigun to z-axis <0.000000> now;
70+
turn lminigun to z-axis <90.000000> speed <240.000000>;
71+
sleep 100;
72+
}
73+
++gun_1;
74+
if( gun_1 == 2 )
75+
{
76+
gun_1 = 0;
77+
}
78+
}
79+
80+
AimFromPrimary(piecenum)
81+
{
82+
piecenum = sleeves;
83+
}
84+
85+
QueryPrimary(piecenum)
86+
{
87+
if( gun_1 == 0 )
88+
{
89+
piecenum = rflare;
90+
}
91+
if( gun_1 == 1 )
92+
{
93+
piecenum = lflare;
94+
}
95+
}
96+
97+
SweetSpot(piecenum)
98+
{
99+
piecenum = base;
100+
}
101+
102+
Killed(severity, corpsetype)
103+
{
104+
if( severity <= 25 )
105+
{
106+
corpsetype = 1;
107+
explode body type NOHEATCLOUD;
108+
explode turret type NOHEATCLOUD;
109+
explode sleeves type NOHEATCLOUD;
110+
explode rminigun type NOHEATCLOUD;
111+
explode lminigun type NOHEATCLOUD;
112+
explode g1 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
113+
explode g2 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
114+
explode g5 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
115+
explode g7 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
116+
return (corpsetype);
117+
}
118+
if( severity <= 50 )
119+
{
120+
corpsetype = 2;
121+
explode body type NOHEATCLOUD;
122+
explode turret type NOHEATCLOUD | FALL;
123+
explode sleeves type NOHEATCLOUD | FALL;
124+
explode rminigun type NOHEATCLOUD | FALL;
125+
explode lminigun type NOHEATCLOUD | FALL;
126+
explode g1 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
127+
explode g2 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
128+
explode g5 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
129+
explode g7 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
130+
return (corpsetype);
131+
}
132+
corpsetype = 3;
133+
explode body type NOHEATCLOUD;
134+
explode turret type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
135+
explode sleeves type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
136+
explode rminigun type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
137+
explode lminigun type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
138+
explode g1 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
139+
explode g2 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
140+
explode g5 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
141+
explode g7 type NOHEATCLOUD | FALL | SMOKE | FIRE | EXPLODE_ON_HIT;
142+
return (corpsetype);
143+
}

scripts/tll_obliterator2.cob

2.61 KB
Binary file not shown.

scripts/tlldischarge.bos

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ RestoreAfterDelay()
520520
bAiming = FALSE;
521521
}
522522

523-
AimSecondary(heading, pitch)
523+
AimWeapon1(heading, pitch)
524524
{
525525
signal SIG_AIM;
526526
set-signal-mask SIG_AIM;
@@ -540,7 +540,7 @@ AimSecondary(heading, pitch)
540540
return (1);
541541
}
542542

543-
AimPrimary(heading, pitch)
543+
AimWeapon2(heading, pitch)
544544
{
545545
signal SIG_AIM_2;
546546
set-signal-mask SIG_AIM_2;
@@ -552,7 +552,7 @@ AimPrimary(heading, pitch)
552552
return (1);
553553
}
554554

555-
FireSecondary()
555+
FireWeapon1()
556556
{
557557
if( gun_1 == 0 )
558558
{
@@ -575,7 +575,7 @@ FireSecondary()
575575
}
576576
}
577577

578-
FirePrimary()
578+
FireWeapon2()
579579
{
580580
++gun_2;
581581
if( gun_2 == 2 )
@@ -585,17 +585,17 @@ FirePrimary()
585585
}
586586
}
587587

588-
AimFromSecondary(piecenum)
588+
AimFromWeapon1(piecenum)
589589
{
590590
piecenum = torso;
591591
}
592592

593-
AimFromPrimary(piecenum)
593+
AimFromWeapon2(piecenum)
594594
{
595595
piecenum = mpack;
596596
}
597597

598-
QuerySecondary(piecenum)
598+
QueryWeapon1(piecenum)
599599
{
600600
if( gun_1 == 0 )
601601
{
@@ -609,7 +609,7 @@ QuerySecondary(piecenum)
609609
}
610610
}
611611

612-
QueryPrimary(piecenum)
612+
QueryWeapon2(piecenum)
613613
{
614614
if( gun_2 == 0 )
615615
{

scripts/tlldischarge.cob

-8 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)