Skip to content

Commit

Permalink
Legion Hover Constructor added (#3988)
Browse files Browse the repository at this point in the history
* Legion hovercon

Added the Legion Hover Constructor

* Added Legion Fortifier

* Revert "Added Legion Fortifier"

This reverts commit 7f04e94.

* Hovercon Fix 1

Moved scripts to correct folder.
  • Loading branch information
EnderRobo authored Dec 14, 2024
1 parent 7224a3c commit 07f958b
Show file tree
Hide file tree
Showing 7 changed files with 176 additions and 5 deletions.
20 changes: 20 additions & 0 deletions luaui/configs/DeferredLightsGL4config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19163,6 +19163,26 @@ local unitLights = {
lifetime = 0, sustain = 0, animtype = 0},
}
},
['legch'] = {
buildlight = { -- this is the lightname
lightType = 'cone',
pieceName = 'cagelight_emit',
lightConfig = { posx = 0, posy = 0, posz = 0, radius = 18,
dirx = 1, diry = 0, dirz = 0, theta = 0.99000001,
r = 1.29999995, g = 0.89999998, b = 0.1, a = 2,
modelfactor = 0.1, specular = 0.2, scattering = 1.5, lensflare = 8,
lifetime = 0, sustain = 0, animtype = 0},
},
nanolight = {
lightType = 'point',
pieceName = 'nano',
lightConfig = { posx = 0, posy = 0, posz = 1, radius = 17,
color2r = 0, color2g = 0, color2b = 0, colortime = 0,
r = -1, g = 1, b = 1, a = 0.3,
modelfactor = 0.5, specular = 0.5, scattering = 1, lensflare = 10,
lifetime = 0, sustain = 0, animtype = 0},
}
},
['armraz'] = {
eyes1 = {
lightType = 'point',
Expand Down
Binary file added objects3d/Units/legch.s3o
Binary file not shown.
Binary file added objects3d/Units/legch_dead.s3o
Binary file not shown.
151 changes: 151 additions & 0 deletions scripts/Units/legch_clean.bos
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@

#include "../recoil_common_includes.h"

piece base, ground, cylinder, cagelight, cagelight_emit, fan, lfan, rfan, lhinge1, lhinge2, ldoor, rhinge1, rhinge2, rdoor, turret, box, gun, nano, wake;

static-var terrain, readyToBuild;

// Signal definitions
#define SIGNAL_MOVE 1
#define SIGNAL_BUILD 2
#define SIGNAL_IDLE 8


#define HOVER_BASE base
#define HOVER_BANKSPEED <12>
#define HOVER_ROCKBASE ground
#define HOVER_WOBBLE_PERIOD 38
#define HOVER_WOBBLE_AMPLITUDE [0.1]
#define HOVER_WAKEPIECE wake
#define HOVER_IDLE_SFX 1024 + 2
#define HOVER_WAKE_SFX_1 1024 + 0
#define HOVER_WAKE_SFX_2 1024 + 1
#include "../bar_hovercraft_common.h"

#define BASEPIECE base
#define HITSPEED <30.0>
//how 'heavy' the unit is, on a scale of 1-10
#define UNITSIZE 2
#define MAXTILT 100

#include "../unit_hitbyweaponid_and_smoke.h"


Create()
{
hide nano;
hide wake;
hide cagelight_emit;
spin cylinder around x-axis speed <30> accelerate <10>;
turn fan to x-axis <-45> now;
spin lfan around y-axis speed <-300> accelerate <30>;
spin rfan around y-axis speed <300> accelerate <30>;
readyToBuild = 0;
SLEEP_UNTIL_UNITFINISHED;
start-script HoverCraftMotion();
}

StartBuilding(heading, pitch)
{
signal SIGNAL_BUILD;
set-signal-mask SIGNAL_BUILD;

if (!readyToBuild){
turn ldoor to z-axis <180> speed <50.0>;
turn lhinge2 to z-axis <100> speed <50.0>;
turn lhinge1 to z-axis <30> speed <50.0>;
turn rdoor to z-axis <-180> speed <50.0>;
turn rhinge2 to z-axis <-100> speed <50.0>;
turn rhinge1 to z-axis <-30> speed <50.0>;
wait-for-turn rhinge1 around z-axis;
move box to y-axis [9] speed [10];
wait-for-move box along y-axis;
move cagelight to y-axis [2.2] speed [5];
readyToBuild = 1;
}

show nano;

turn turret to y-axis heading speed <160.0>;
turn gun to x-axis <0.000000> - pitch speed <40.0>;
wait-for-turn turret around y-axis;
set INBUILDSTANCE to 1;

show cagelight_emit;
spin cagelight_emit around y-axis speed <225>;
spin cylinder around x-axis speed <240> accelerate <10>;

readyToBuild = 1;
}

StopBuilding()
{
signal SIGNAL_BUILD;
set-signal-mask SIGNAL_BUILD;

hide nano;
hide cagelight_emit;
turn cagelight_emit to y-axis <0> now;

sleep 6000;

set INBUILDSTANCE to 0;

readyToBuild = 0;

turn turret to y-axis <0> speed <160.0>;
turn gun to x-axis <0> speed <40.0>;
wait-for-turn turret around y-axis;
turn ldoor to z-axis <0> speed <50.0>;
turn lhinge1 to z-axis <0> speed <50.0>;
turn lhinge2 to z-axis <0> speed <50.0>;
turn rdoor to z-axis <0> speed <50.0>;
turn rhinge1 to z-axis <0> speed <50.0>;
turn rhinge2 to z-axis <0> speed <50.0>;
move box to y-axis [0] speed [10];
move cagelight to y-axis [0] speed [5];
spin cylinder around x-axis speed <30> accelerate <5>;
}

QueryNanoPiece(pieceIndex)
{
pieceIndex = nano;
}


Killed(severity, corpsetype)
{
if( severity <= 25 )
{
corpsetype = 1 ;
explode base type BITMAPONLY | NOHEATCLOUD;

explode turret type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano type BITMAPONLY | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 50 )
{
corpsetype = 2 ;
explode base type BITMAPONLY | NOHEATCLOUD;

explode turret type FALL | NOHEATCLOUD;
explode nano type FALL | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 99 )
{
corpsetype = 3 ;
explode base type FIRE | SMOKE | FALL | NOHEATCLOUD;

explode turret type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano type FIRE | SMOKE | FALL | NOHEATCLOUD;
return(corpsetype);
}
corpsetype = 3 ;
explode base type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;

explode turret type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode nano type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
return corpsetype;
}
Binary file added scripts/Units/legch_clean.cob
Binary file not shown.
Binary file modified unitpics/legch.dds
Binary file not shown.
10 changes: 5 additions & 5 deletions units/Legion/Constructors/legch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ return {
speed = 60.899,
maxwaterdepth = 0,
movementclass = "HOVER3",
objectname = "Units/CORCH.s3o",
objectname = "Units/LEGCH.s3o",
radardistance = 50,
script = "Units/CORCH.cob",
script = "Units/LEGCH_CLEAN.cob",
seismicsignature = 0,
selfdestructas = "smallExplosionGenericSelfd-builder",
sightdistance = 338,
Expand Down Expand Up @@ -87,8 +87,8 @@ return {
},
customparams = {
unitgroup = 'builder',
model_author = "Beherith",
normaltex = "unittextures/cor_normal.dds",
model_author = "EnderRobo",
normaltex = "unittextures/leg_normal.dds",
subfolder = "CorHovercraft",
},
featuredefs = {
Expand All @@ -104,7 +104,7 @@ return {
footprintz = 3,
height = 20,
metal = 100,
object = "Units/corch_dead.s3o",
object = "Units/legch_dead.s3o",
reclaimable = true,
},
heap = {
Expand Down

0 comments on commit 07f958b

Please sign in to comment.