diff --git a/gamedata/icontypes.lua b/gamedata/icontypes.lua index c4dcac8b9d..8d56ec8c73 100644 --- a/gamedata/icontypes.lua +++ b/gamedata/icontypes.lua @@ -1875,6 +1875,10 @@ local icontypes = { bitmap = "icons/vehicle_t2_aa_flak.png", size = 1.36499989 }, + legvflak = { + bitmap = "icons/vehicle_t2_aa_flak.png", + size = 1.36499989 + }, corsiegebreaker = { bitmap = "icons/vehicle_t2_tank_laser.png", size = 1.46999991 diff --git a/language/en/units.json b/language/en/units.json index d4febd7946..806d793e94 100644 --- a/language/en/units.json +++ b/language/en/units.json @@ -722,7 +722,8 @@ "legfig": "Noctua", "legfhive": "Hive", "legfmkr": "Naval Energy Converter", - "legflak": "Ravager", + "legflak": "Pluto", + "legvflak": "Charon", "legfloat": "Triton", "legfort": "Tyrannus", "legfortt4": "Epic Tyrannus", @@ -1582,7 +1583,8 @@ "legfhp": "Builds Hovercraft", "legfig": "Fighter / Scout Drone", "legfloat": "Heavy Convertible Tank/Boat", - "legflak": "Anti-Air Gatling Gun", + "legflak": "Anti-Air Minigun", + "legvflak": "Anti-Air Minigun Truck", "legfort": "Flying Fortress", "legfortt4": "Gigantic Flying Fortress", "legafus": "Produces 3000 Energy (Hazardous)", diff --git a/luarules/configs/gui_soundeffects.lua b/luarules/configs/gui_soundeffects.lua index ff245ede03..9d86a3fd2a 100644 --- a/luarules/configs/gui_soundeffects.lua +++ b/luarules/configs/gui_soundeffects.lua @@ -3099,6 +3099,11 @@ GUIUnitSoundEffects = { BaseSoundMovementType = "cor-tnk-medium-ok", BaseSoundWeaponType = "arty-large", }, + legvflak = { + BaseSoundSelectType = "leg-veh-small-sel", + BaseSoundMovementType = "leg-veh-small-ok", + BaseSoundWeaponType = "flak", + }, legaskirmtank = { BaseSoundSelectType = "cor-tnk-medium-sel", BaseSoundMovementType = "cor-tnk-medium-ok", diff --git a/luarules/configs/scav_spawn_defs.lua b/luarules/configs/scav_spawn_defs.lua index d234b952e3..70476adb3a 100644 --- a/luarules/configs/scav_spawn_defs.lua +++ b/luarules/configs/scav_spawn_defs.lua @@ -455,6 +455,7 @@ local LandUnitsList = { ["legvcarry_scav"] = 2, ["legbart_scav"] = 2, ["legsrail_scav"] = 2, + ["legvflak_scav"] = 2, }, [5] = { @@ -779,6 +780,8 @@ local SeaUnitsList = { ["cormship_scav"] = 2, ["corsjam_scav"] = 2, ["corsentinel_scav"] = 2, + --Legion + ["legvflak_scav"] = 2, }, [6] = { --Armada @@ -1909,9 +1912,9 @@ addNewSquad({ type = "specialAirLand", minAnger = tierConfiguration[3].minAnger, addNewSquad({ type = "specialLand", minAnger = tierConfiguration[4].minAnger, units = { "10 armfav_scav","10 corfav_scav","25 armzapper_scav",}, weight = 6, maxAnger = tierConfiguration[4].maxAnger}) --Rover and EMP Rover/Whole Tier Length --Land addNewSquad({ type = "specialLand", minAnger = tierConfiguration[4].minAnger, units = { "6 armlatnk_scav","6 cortorch_scav","6 legmrv_scav",}, weight = 4, maxAnger = tierConfiguration[4].maxAnger}) --T2 Veh Raid -addNewSquad({ type = "specialLand", minAnger = tierConfiguration[4].minAnger, units = { "6 armbull_scav","6 correap_scav","1 corgol_scav","2 legaheattank_scav","2 armyork_scav","2 corsent_scav",}, weight = 4, maxAnger = tierConfiguration[4].maxAnger}) --T2 Veh Assault/AA +addNewSquad({ type = "specialLand", minAnger = tierConfiguration[4].minAnger, units = { "6 armbull_scav","6 correap_scav","1 corgol_scav","2 legaheattank_scav","2 armyork_scav","2 corsent_scav","2 legvflak_scav",}, weight = 4, maxAnger = tierConfiguration[4].maxAnger}) --T2 Veh Assault/AA addNewSquad({ type = "specialLand", minAnger = tierConfiguration[5].minAnger, units = { "2 armmanni_scav","2 corban_scav","1 legvcarry_scav",}, weight = 4, maxAnger = tierConfiguration[5].maxAnger}) --T2 Veh Unique -addNewSquad({ type = "specialLand", minAnger = tierConfiguration[5].minAnger, units = { "3 armmart_scav","1 armmerl_scav","1 armyork_scav","3 cormart_scav","1 corvroc_scav","1 corsent_scav","1 leginf_scav",}, weight = 4, maxAnger = tierConfiguration[5].maxAnger}) --T2 Arty/AA +addNewSquad({ type = "specialLand", minAnger = tierConfiguration[5].minAnger, units = { "3 armmart_scav","1 armmerl_scav","1 armyork_scav","3 cormart_scav","1 corvroc_scav","1 corsent_scav","2 legvflak_scav","1 leginf_scav",}, weight = 4, maxAnger = tierConfiguration[5].maxAnger}) --T2 Arty/AA --air addNewSquad({ type = "specialAirLand", minAnger = tierConfiguration[5].minAnger, units = { "3 armawac_scav","3 corawac_scav",}, weight = 4, maxAnger = 1000}) --T2 Air Scouts addNewSquad({ type = "specialAirLand", minAnger = tierConfiguration[5].minAnger, units = { "2 armstil_scav",}, weight = 4, maxAnger = 1000}) --EMP Bombers @@ -1924,9 +1927,9 @@ addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, un addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, units = { "6 cortorch_scav","6 legmrv_scav",}, weight = 3, maxAnger = tierConfiguration[6].maxAnger}) --T2 Veh Raid --Land addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, units = { "12 armmar_scav",}, weight = 3, maxAnger = tierConfiguration[6].maxAnger}) --T3 Raid -addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, units = { "6 armmeatball_scav","6 armassimilator_scav","2 armyork_scav","2 corsent_scav",}, weight = 4, maxAnger = tierConfiguration[6].maxAnger}) --T3 Assault/AA -addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, units = { "6 corshiva_scav","2 armraz_scav","1 legpede_scav","1 armyork_scav","1 corsent_scav",}, weight = 4, maxAnger = tierConfiguration[6].maxAnger}) --T3 Assault/AA -addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, units = { "2 armvang_scav","2 corcat_scav","1 armyork_scav","1 corsent_scav",}, weight = 4, maxAnger = tierConfiguration[6].maxAnger}) --T3 Arty/AA +addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, units = { "6 armmeatball_scav","6 armassimilator_scav","2 armyork_scav","2 corsent_scav"," 2legvflak_scav",}, weight = 4, maxAnger = tierConfiguration[6].maxAnger}) --T3 Assault/AA +addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, units = { "6 corshiva_scav","2 armraz_scav","1 legpede_scav","1 armyork_scav","1 corsent_scav","2 legvflak_scav",}, weight = 4, maxAnger = tierConfiguration[6].maxAnger}) --T3 Assault/AA +addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, units = { "2 armvang_scav","2 corcat_scav","1 armyork_scav","1 corsent_scav","2 legvflak_scav",}, weight = 4, maxAnger = tierConfiguration[6].maxAnger}) --T3 Arty/AA addNewSquad({ type = "specialLand", minAnger = tierConfiguration[6].minAnger, units = { "5 armvadert4_scav",}, weight = 3, maxAnger = 1000}) --Epic Tumbleweeds addNewSquad({ type = "specialSea", minAnger = tierConfiguration[6].minAnger, units = { "5 armvadert4_scav",}, weight = 3, maxAnger = 1000}) --Epic Tumbleweeds --air diff --git a/luaui/configs/buildmenu_sorting.lua b/luaui/configs/buildmenu_sorting.lua index dc16721875..fd7673610d 100644 --- a/luaui/configs/buildmenu_sorting.lua +++ b/luaui/configs/buildmenu_sorting.lua @@ -326,6 +326,7 @@ local unitOrderTable = { ['armyork'] = 008200, ['corsent'] = 008210, + ['legvflak'] = 008220, ['armah'] = 008300, ['corah'] = 008310, diff --git a/luaui/configs/gridmenu_layouts.lua b/luaui/configs/gridmenu_layouts.lua index eebf53004c..ad4c8824ff 100644 --- a/luaui/configs/gridmenu_layouts.lua +++ b/luaui/configs/gridmenu_layouts.lua @@ -65,7 +65,7 @@ local labGrids = { legavp = { "legacv", "legmrv", "legaskirmtank", "legamcluster", -- T2 con, Quickshot, scorpion, cleaver "legavrad", "legavjam", "legaheattank", "leginf", -- radar, jammer, goli, inferno - "legfloat", "legmed", "corsent", "legavroc", -- the new and improved triton, medusa, AA, boreas + "legfloat", "legmed", "legvflak", "legavroc", -- the new and improved triton, medusa, AA, boreas }, -- T1 air armap = { diff --git a/objects3d/Units/legflak.s3o b/objects3d/Units/legflak.s3o index f0020e0333..732b98680b 100644 Binary files a/objects3d/Units/legflak.s3o and b/objects3d/Units/legflak.s3o differ diff --git a/objects3d/Units/legflak_dead.s3o b/objects3d/Units/legflak_dead.s3o index 69190ccd3b..34643a75cd 100644 Binary files a/objects3d/Units/legflak_dead.s3o and b/objects3d/Units/legflak_dead.s3o differ diff --git a/objects3d/Units/legvflak.s3o b/objects3d/Units/legvflak.s3o new file mode 100644 index 0000000000..1501fc47be Binary files /dev/null and b/objects3d/Units/legvflak.s3o differ diff --git a/objects3d/Units/legvflak_dead.s3o b/objects3d/Units/legvflak_dead.s3o new file mode 100644 index 0000000000..2df8e97215 Binary files /dev/null and b/objects3d/Units/legvflak_dead.s3o differ diff --git a/scripts/Units/legflak.bos b/scripts/Units/legflak.bos index 6ac41c7150..a5e3c31c38 100644 --- a/scripts/Units/legflak.bos +++ b/scripts/Units/legflak.bos @@ -1,14 +1,13 @@ -#define TA // This is a TA script -#include "sfxtype.h" -#include "exptype.h" +#include "../recoil_common_includes.h" -piece base, lflare, rflare, pole, turret, lsleeve, lbarrel, rsleeve, rbarrel, laim, raim, lshot, rshot, dish; +piece base, lflare, rflare, turret, sleeve, lbarrel, rbarrel, radar; -static-var activating, wpn1_lasthead, restore_delay, gun_switch, inrange, aiming, timer, lastaimed, lastfired, thisframe, thatframe; +static-var wpn1_lasthead, restore_delay, gun_switch; // Signal definitions -#define SIG_AIM 2 +#define SIGNAL_AIM1 1 +#define SIGNAL_FIRE1 2 #define SMOKEPIECE base @@ -18,27 +17,12 @@ static-var activating, wpn1_lasthead, restore_delay, gun_switch, inrange, aimin static-var Stunned; ExecuteRestoreAfterDelay() { - aiming = 0; if (Stunned) { return (1); } - turn lsleeve to x-axis <-30> speed <25.00000>; - turn rsleeve to x-axis <-30> speed <25.00000>; - spin pole around y-axis speed <25.0>; + turn sleeve to x-axis <-30> speed <25.00000>; + spin turret around y-axis speed <25.0>; - - - spin rbarrel around z-axis speed <600.000000>; - spin lbarrel around z-axis speed <600.000000>; - sleep restore_delay; - spin rbarrel around z-axis speed <300.000000>; - spin lbarrel around z-axis speed <300.000000>; - sleep (restore_delay / 2); - spin rbarrel around z-axis speed <150.000000>; - spin lbarrel around z-axis speed <150.000000>; - sleep (restore_delay / 4); - stop-spin rbarrel around z-axis; - stop-spin lbarrel around z-axis; sleep restore_delay; wpn1_lasthead = 1000000; set-signal-mask 0; @@ -58,187 +42,77 @@ RestoreAfterDelay() start-script ExecuteRestoreAfterDelay(); } - - -SweepFire()//nope. -{ - while( TRUE ) - { - - thatframe = get (GAME_FRAME); - if ((lastaimed > (thatframe - 15)) AND aiming == 1) { - - emit-sfx 2048+0 from lshot; - emit-sfx 2048+0 from rshot; - timer = timer + 1; - } - if (lastaimed <= (thatframe - 15)) - { - //inrange = 0; - //signal SIG_AIM; - //timer = 0; - start-script ExecuteRestoreAfterDelay(); - } - sleep 20; - } -} - - - Create() { + hide lflare; + hide rflare; + restore_delay = 6000; - - lastaimed = get (GAME_FRAME); - timer = 0; - inrange = 0; - //start-script SweepFire(); - aiming = 0; - - - - //hide lflare; - //hide rflare; - activating = 0; gun_switch = 0; - restore_delay = 3000; - //call-script InitState(); - - turn dish to x-axis <-30> speed <25.00000>; - spin dish around z-axis speed <25.0>; - - + + SLEEP_UNTIL_UNITFINISHED; - while( get BUILD_PERCENT_LEFT ) - { - sleep 400; - } + turn radar to x-axis <-45> speed <25.0>; + spin radar around z-axis speed <60.0>; start-script ExecuteRestoreAfterDelay(); } - -SetMaxReloadTime(Func_Var_1) +AimFromWeapon1(pieceIndex) { - //restore_delay = Func_Var_1 * 2; - return (0); + pieceIndex = turret; } - - - - - - - - - - - - AimWeapon1(heading, pitch) { - stop-spin pole around y-axis; - - aiming = 1; - //inrange = 1; - spin lbarrel around z-axis speed <700.000000>; - spin rbarrel around z-axis speed <700.000000>; - //thisframe = get (GAME_FRAME); + signal SIGNAL_AIM1; + set-signal-mask SIGNAL_AIM1; - lastaimed = get (GAME_FRAME); + stop-spin turret around y-axis; - signal SIG_AIM; - set-signal-mask SIG_AIM; - turn pole to y-axis heading speed <500.000000>; - turn lsleeve to x-axis <0.000000> - pitch speed <400.000000>; - turn rsleeve to x-axis <0.000000> - pitch speed <400.000000>; - //might need to remove this and use faster aiming? - //if (((get ABS(wpn1_lasthead - heading)) > 65536) OR(((get ABS(wpn1_lasthead - heading)) > 1300) AND ((get ABS(wpn1_lasthead - heading)) < 64236))) - //{ - wpn1_lasthead = 1000000; - wait-for-turn pole around y-axis; - wait-for-turn lsleeve around x-axis; - wait-for-turn rsleeve around x-axis; - //} + turn turret to y-axis heading speed <240.0>; + turn sleeve to x-axis <0.0> - pitch speed <120.0>; + + wpn1_lasthead = heading; start-script RestoreAfterDelay(); return (1); - - } - - -FireWeapon1() { - inrange = 1; - aiming = 1; - timer = 0; - lastfired = get (GAME_FRAME); - - - spin lbarrel around z-axis speed <900.000000>; - spin rbarrel around z-axis speed <900.000000>; - return (0); -} -//* -Shot1() { - if (gun_switch==0) { - emit-sfx 1024 + 0 from lflare; - gun_switch = 1; - } else { - emit-sfx 1024 + 0 from rflare; - gun_switch = 0; - } -} -//*/ -QueryWeapon1(piecenum) { - piecenum = lshot + gun_switch; - return (0); -} - -AimFromWeapon1(piecenum) { - piecenum = laim; - return (0); -} - - - - - - -//put a ciws (WITHOUT INTERCEPTOR TAG) on weapon 2, enable sweepfire, and a hitscan option on weapon 1 for the faking method - - - -/* -AimWeapon2(heading, pitch) +FireWeapon1() { - //wait a few after main gun last fired, then allow (can't do this apparently...) + spin lbarrel around z-axis speed <-2000.0>; + spin rbarrel around z-axis speed <2000.0>; + stop-spin lbarrel around z-axis decelerate <12>; + stop-spin rbarrel around z-axis decelerate <12>; return (0); } -FireWeapon2() +QueryWeapon1(piecenum) { + piecenum = lflare + gun_switch; return (0); } - -QueryWeapon2(piecenum) +Shot1(zero) //Barrel switcher so each minigun fires at the same time { - piecenum = lflare; - return (0); -} - -AimFromWeapon1(piecenum) { - piecenum = laim; - return (0); + signal SIGNAL_FIRE1; + set-signal-mask SIGNAL_FIRE1; + + + if(gun_switch == 0) + { + emit-sfx 1024 + 0 from rflare; + } + else + { + emit-sfx 1024 + 0 from lflare; + } + + gun_switch = !gun_switch; + return(1); } -//*/ - - - SweetSpot(piecenum) { piecenum = base; @@ -252,40 +126,36 @@ Killed(severity, corpsetype) { corpsetype = 1 ; explode base type BITMAPONLY | NOHEATCLOUD; - explode lsleeve type BITMAPONLY | NOHEATCLOUD; - explode rsleeve type BITMAPONLY | NOHEATCLOUD; + explode sleeve type BITMAPONLY | NOHEATCLOUD; explode lbarrel type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode pole type BITMAPONLY | NOHEATCLOUD; + explode turret type BITMAPONLY | NOHEATCLOUD; return(corpsetype); } if( severity <= 50 ) { corpsetype = 2 ; explode base type BITMAPONLY | NOHEATCLOUD; - explode lsleeve type FALL | NOHEATCLOUD; - explode rsleeve type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode sleeve type FALL | NOHEATCLOUD; explode lbarrel type FIRE | SMOKE | FALL | NOHEATCLOUD; explode rbarrel type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode pole type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode turret type FIRE | SMOKE | FALL | NOHEATCLOUD; return(corpsetype); } if( severity <= 99 ) { corpsetype = 3 ; explode base type BITMAPONLY | NOHEATCLOUD; - explode lsleeve type SMOKE | FALL | NOHEATCLOUD; - explode rsleeve type SMOKE | FALL | NOHEATCLOUD; + explode sleeve type SMOKE | FALL | NOHEATCLOUD; explode lbarrel type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; explode rbarrel type SMOKE | FALL | NOHEATCLOUD; - explode pole type SMOKE | FALL | NOHEATCLOUD; + explode turret type SMOKE | FALL | NOHEATCLOUD; return(corpsetype); } corpsetype = 3 ; explode base type BITMAPONLY | NOHEATCLOUD; - explode lsleeve type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - explode rsleeve type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode sleeve type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; explode lbarrel type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; explode rbarrel type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; - explode pole type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; + explode turret type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; return corpsetype; } \ No newline at end of file diff --git a/scripts/Units/legflak.cob b/scripts/Units/legflak.cob index 3a1382c5aa..9d14d8436d 100644 Binary files a/scripts/Units/legflak.cob and b/scripts/Units/legflak.cob differ diff --git a/scripts/Units/legvflak.bos b/scripts/Units/legvflak.bos new file mode 100644 index 0000000000..fcc54d1940 --- /dev/null +++ b/scripts/Units/legvflak.bos @@ -0,0 +1,228 @@ + +#include "../recoil_common_includes.h" + +// Signal definitions +#define SIGNAL_MOVE 1 +#define SIGNAL_AIM1 2 +#define SIGNAL_FIRE1 4 + +piece base, armor, turret, sleeve, lbarrel, rbarrel, lflare, rflare, wheelfl, wheelfr, wheelml, wheelmr, wheelbl, wheelbr, radar; + +static-var restore_delay, currentSpeed, moveSpeed, wheelSpeed, oldHeading, wpn1_lasthead, gun_switch; + +#define BASEPIECE base +#define HITSPEED <85.0> +//how 'heavy' the unit is, on a scale of 1-10 +#define UNITSIZE 1 +#define MAXTILT 100 + +#define TB_BASE base +#define TB_TURNRATE <15.0> +#define TB_TILT_X <0.1> +#define TB_BANK_Z <0.1> // Do not define this if you dont want banking +#include "../tilt_bank_mobileunit.h" + +Steering(heading, steery, currentSpeed) +{ + while(1) + { + heading = get HEADING; + steery = (heading - oldheading)*2; + + turn wheelfl to y-axis steery speed <120>; + turn wheelfr to y-axis steery speed <120>; + turn wheelbl to y-axis 0 - steery speed <120>; + turn wheelbr to y-axis 0 - steery speed <120>; + + currentSpeed = (get CURRENT_SPEED)*20/moveSpeed; + wheelSpeed = currentSpeed * 50; + if (currentSpeed<1) currentSpeed=1; // prevent infinite timing + + spin wheelfl around x-axis speed (<1> * wheelSpeed); + spin wheelfr around x-axis speed (<1> * wheelSpeed); + spin wheelml around x-axis speed (<1> * wheelSpeed); + spin wheelmr around x-axis speed (<1> * wheelSpeed); + spin wheelbl around x-axis speed (<1> * wheelSpeed); + spin wheelbr around x-axis speed (<1> * wheelSpeed); + sleep 66; + oldheading = heading; + } +} + +Create() +{ + hide lflare; + hide rflare; + restore_delay = 6000; + moveSpeed = get MAX_SPEED; + oldheading = get HEADING; + call-script TB_Init(); + start-script Steering(); + + gun_switch = 0; + + SLEEP_UNTIL_UNITFINISHED; + + turn radar to x-axis <-45> speed <25.0>; + spin radar around z-axis speed <60.0>; + start-script ExecuteRestoreAfterDelay(); +} + +StartMoving(reversing) +{ + signal SIGNAL_MOVE; + set-signal-mask SIGNAL_MOVE; + start-script Steering(); + START_TILTBANK; +} + +StopMoving() +{ + signal SIGNAL_MOVE; + + stop-spin wheelfl around x-axis; + stop-spin wheelfr around x-axis; + stop-spin wheelml around x-axis; + stop-spin wheelmr around x-axis; + stop-spin wheelbl around x-axis; + stop-spin wheelbr around x-axis; + STOP_TILTBANK; +} + + +SetMaxReloadTime(Func_Var_1) +{ + restore_delay = Func_Var_1 * 2; +} + +static-var Stunned; +ExecuteRestoreAfterDelay() +{ + if (Stunned) { + return (1); + } + turn sleeve to x-axis <-30> speed <25.00000>; + spin turret around y-axis speed <25.0>; + + sleep restore_delay; + wpn1_lasthead = 1000000; + set-signal-mask 0; +} + +SetStunned(State) +{ + Stunned = State; + if (!Stunned) { + start-script ExecuteRestoreAfterDelay(); + } +} + +RestoreAfterDelay() +{ + sleep restore_delay; + start-script ExecuteRestoreAfterDelay(); +} + +AimFromWeapon1(pieceIndex) +{ + pieceIndex = turret; +} + +AimWeapon1(heading, pitch) +{ + signal SIGNAL_AIM1; + set-signal-mask SIGNAL_AIM1; + + stop-spin turret around y-axis; + + turn turret to y-axis heading speed <240.0>; + turn sleeve to x-axis <0.0> - pitch speed <120.0>; + + //wait-for-turn turret around y-axis; + + wpn1_lasthead = heading; + start-script RestoreAfterDelay(); + return (1); +} + +FireWeapon1() +{ + spin lbarrel around z-axis speed <-2000.0>; + spin rbarrel around z-axis speed <2000.0>; + stop-spin lbarrel around z-axis decelerate <12>; + stop-spin rbarrel around z-axis decelerate <12>; + return (0); +} + +QueryWeapon1(piecenum) +{ + piecenum = lflare + gun_switch; + return (0); +} + +Shot1(zero) //Barrel switcher so each minigun fires at the same time +{ + signal SIGNAL_FIRE1; + set-signal-mask SIGNAL_FIRE1; + + + if(gun_switch == 0) + { + emit-sfx 1024 + 0 from rflare; + } + else + { + emit-sfx 1024 + 0 from lflare; + } + + gun_switch = !gun_switch; + return(1); +} + +SweetSpot(piecenum) +{ + piecenum = base; + return (0); +} +Killed(severity, corpsetype) +{ + if( severity <= 25 ) + { + corpsetype = 1 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode turret type BITMAPONLY | NOHEATCLOUD; + explode armor type BITMAPONLY | NOHEATCLOUD; + //explode flare1 type BITMAPONLY | NOHEATCLOUD; + //explode barrel2 type BITMAPONLY | NOHEATCLOUD; + //explode flare2 type BITMAPONLY | NOHEATCLOUD; + return(corpsetype); + } + if( severity <= 50 ) + { + corpsetype = 2 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode turret type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode armor type FIRE | SMOKE | FALL | NOHEATCLOUD; + //explode flare1 type FALL | NOHEATCLOUD; + //explode barrel2 type FALL | NOHEATCLOUD; + //explode flare2 type FIRE | SMOKE | FALL | NOHEATCLOUD; + return(corpsetype); + } + if( severity <= 99 ) + { + corpsetype = 3 ; + explode base type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode turret type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD; + explode armor type SMOKE | FALL | NOHEATCLOUD; + //explode flare1 type SMOKE | FALL | NOHEATCLOUD; + //explode flare2 type EXPLODE_ON_HIT | 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 | SMOKE | FALL | NOHEATCLOUD; + explode armor type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + //explode flare1 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; + //explode flare2 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; + return corpsetype; +} diff --git a/scripts/Units/legvflak.cob b/scripts/Units/legvflak.cob new file mode 100644 index 0000000000..fa0ccf1856 Binary files /dev/null and b/scripts/Units/legvflak.cob differ diff --git a/unitpics/legflak.dds b/unitpics/legflak.dds index dfc941b0e7..6eac186699 100644 Binary files a/unitpics/legflak.dds and b/unitpics/legflak.dds differ diff --git a/unitpics/legvflak.dds b/unitpics/legvflak.dds new file mode 100644 index 0000000000..22c3976b57 Binary files /dev/null and b/unitpics/legvflak.dds differ diff --git a/units/Legion/Defenses/legflak.lua b/units/Legion/Defenses/legflak.lua index c855e6c3df..026fb8c265 100644 --- a/units/Legion/Defenses/legflak.lua +++ b/units/Legion/Defenses/legflak.lua @@ -35,8 +35,8 @@ return { buildinggrounddecalsizex = 5, buildinggrounddecaldecayspeed = 30, unitgroup = 'aa', - model_author = "Cremuss", - normaltex = "unittextures/cor_normal.dds", + model_author = "Tharsis", + normaltex = "unittextures/leg_normal.dds", removewait = true, subfolder = "Legion/defenses", techlevel = 2, @@ -115,7 +115,6 @@ return { burstrate = 0.02, burnblow = true, canattackground = false, - cegtag = "flaktrailaamg", collidefriendly = false, craterareaofeffect = 192, craterboost = 0, @@ -138,13 +137,16 @@ return { soundhitvolume = 7.5, soundstartvolume = 5, stages = 0, - --thickness = 0.91, + texture1 = "shot", + texture2 = "empty", + thickness = 2.5, + tolerance = 16000, turret = true, weapontimer = 1, weapontype = "LaserCannon", weaponvelocity = 3642, damage = { - default = 40, + default = 1, vtol = 60, }, rgbcolor = "1 0.33 0.7", @@ -152,14 +154,14 @@ return { fallOffRate = 0.2, ownerExpAccWeight = 1.35,--does this affect sprayangle too? sprayangle = 600, - thickness = 0.91, - tolerance = 6000, }, }, weapons = { [1] = { badtargetcategory = "NOTAIR LIGHTAIRSCOUT", + burstcontrolwhenoutofarc = 2, def = "legflak_gun", + fastautoretargeting = true, onlytargetcategory = "VTOL", }, }, diff --git a/units/Legion/Labs/legavp.lua b/units/Legion/Labs/legavp.lua index 51a0bebbff..48d2e727b3 100644 --- a/units/Legion/Labs/legavp.lua +++ b/units/Legion/Labs/legavp.lua @@ -63,7 +63,7 @@ return { "legvcarry", "legavroc", "leginf", - "corsent", + "legvflak", "cormabm", "legavjam", "legavrad", diff --git a/units/Legion/Legion EvoCom/legcomlvl10.lua b/units/Legion/Legion EvoCom/legcomlvl10.lua index d32c57a955..ec2b3b55a9 100644 --- a/units/Legion/Legion EvoCom/legcomlvl10.lua +++ b/units/Legion/Legion EvoCom/legcomlvl10.lua @@ -81,7 +81,7 @@ return { [17] = "legshot", [18] = "legmrv", [19] = "leginfestor", - [20] = "corsent", + [20] = "legvflak", [21] = "legflak", [22] = "coratl", [23] = "legmed", diff --git a/units/Legion/Legion EvoCom/legcomlvl4.lua b/units/Legion/Legion EvoCom/legcomlvl4.lua index 5c66fe0d4d..801febbed8 100644 --- a/units/Legion/Legion EvoCom/legcomlvl4.lua +++ b/units/Legion/Legion EvoCom/legcomlvl4.lua @@ -82,7 +82,7 @@ return { [18] = "legshot", [19] = "legstr", [20] = "leginfestor", - [21] = "corsent", + [21] = "legvflak", [22] = "legflak", [23] = "coratl", [24] = "legmed", diff --git a/units/Legion/Legion EvoCom/legcomlvl5.lua b/units/Legion/Legion EvoCom/legcomlvl5.lua index 20908db483..02520560ee 100644 --- a/units/Legion/Legion EvoCom/legcomlvl5.lua +++ b/units/Legion/Legion EvoCom/legcomlvl5.lua @@ -82,7 +82,7 @@ return { [16] = "legshot", [17] = "legstr", [18] = "leginfestor", - [19] = "corsent", + [19] = "legvflak", [20] = "legflak", [21] = "coratl", [22] = "legmed", diff --git a/units/Legion/Legion EvoCom/legcomlvl6.lua b/units/Legion/Legion EvoCom/legcomlvl6.lua index ab46d7439d..67b8b65458 100644 --- a/units/Legion/Legion EvoCom/legcomlvl6.lua +++ b/units/Legion/Legion EvoCom/legcomlvl6.lua @@ -81,7 +81,7 @@ return { [17] = "legshot", [18] = "legmrv", [19] = "leginfestor", - [20] = "corsent", + [20] = "legvflak", [21] = "legflak", [22] = "coratl", [23] = "legmed", diff --git a/units/Legion/Legion EvoCom/legcomlvl7.lua b/units/Legion/Legion EvoCom/legcomlvl7.lua index bdf2b5e0e0..191b4060f7 100644 --- a/units/Legion/Legion EvoCom/legcomlvl7.lua +++ b/units/Legion/Legion EvoCom/legcomlvl7.lua @@ -81,7 +81,7 @@ return { [17] = "legshot", [18] = "legmrv", [19] = "leginfestor", - [20] = "corsent", + [20] = "legvflak", [21] = "legflak", [22] = "coratl", [23] = "legmed", diff --git a/units/Legion/Legion EvoCom/legcomlvl8.lua b/units/Legion/Legion EvoCom/legcomlvl8.lua index 8d2f6199d7..5437d16bc9 100644 --- a/units/Legion/Legion EvoCom/legcomlvl8.lua +++ b/units/Legion/Legion EvoCom/legcomlvl8.lua @@ -81,7 +81,7 @@ return { [17] = "legshot", [18] = "legmrv", [19] = "leginfestor", - [20] = "corsent", + [20] = "legvflak", [21] = "legflak", [22] = "coratl", [23] = "legmed", diff --git a/units/Legion/Legion EvoCom/legcomlvl9.lua b/units/Legion/Legion EvoCom/legcomlvl9.lua index a57be9a6d1..a7e259f914 100644 --- a/units/Legion/Legion EvoCom/legcomlvl9.lua +++ b/units/Legion/Legion EvoCom/legcomlvl9.lua @@ -81,7 +81,7 @@ return { [17] = "legshot", [18] = "legmrv", [19] = "leginfestor", - [20] = "corsent", + [20] = "legvflak", [21] = "legflak", [22] = "coratl", [23] = "legmed", diff --git a/units/Legion/Vehicles/T2 Vehicles/legvflak.lua b/units/Legion/Vehicles/T2 Vehicles/legvflak.lua new file mode 100644 index 0000000000..24b6c11c0c --- /dev/null +++ b/units/Legion/Vehicles/T2 Vehicles/legvflak.lua @@ -0,0 +1,171 @@ +return { + legvflak = { + airsightdistance = 900, + buildpic = "legvflak.DDS", + buildtime = 12000, + canmove = true, + collisionvolumeoffsets = "0 -2 0", + collisionvolumescales = "32 22 50", + collisionvolumetype = "BOX", + corpse = "DEAD", + energycost = 10500, + explodeas = "mediumExplosionGeneric", + footprintx = 3, + footprintz = 3, + health = 2700, + idleautoheal = 5, + idletime = 1800, + leavetracks = true, + maxacc = 0.05823, + maxdec = 0.11647, + maxslope = 14, + maxwaterdepth = 12, + metalcost = 470, + movementclass = "TANK3", + movestate = 0, + nochasecategory = "NOTAIR", + objectname = "Units/legvflak.s3o", + script = "Units/legvflak.cob", + seismicsignature = 0, + selfdestructas = "mediumExplosionGenericSelfd", + sightdistance = 338, + speed = 70, + trackoffset = -5, + trackstrength = 5, + tracktype = "armcroc_tracks", + trackwidth = 41, + turninplace = true, + turninplaceanglelimit = 90, + turninplacespeedlimit = 1.6335, + turnrate = 591.79999, + customparams = { + model_author = "Tharsis", + normaltex = "unittextures/leg_normal.dds", + subfolder = "Legion/Vehicles/T2 Vehicles", + techlevel = 2, + unitgroup = "aa", + }, + featuredefs = { + dead = { + blocking = true, + category = "corpses", + collisionvolumeoffsets = "0.2 -7 1.5", + collisionvolumescales = "32.4 21.8 34.3", + collisionvolumetype = "Box", + damage = 2000, + featuredead = "HEAP", + footprintx = 2, + footprintz = 2, + height = 20, + metal = 288, + object = "Units/legvflak_dead.s3o", + reclaimable = true, + }, + heap = { + blocking = false, + category = "heaps", + collisionvolumescales = "35.0 4.0 6.0", + collisionvolumetype = "cylY", + damage = 1500, + footprintx = 2, + footprintz = 2, + height = 4, + metal = 115, + object = "Units/cor2X2A.s3o", + reclaimable = true, + resurrectable = 0, + }, + }, + sfxtypes = { + explosiongenerators = { + [1] = "custom:barrelshot-flak", + }, + pieceexplosiongenerators = { + [1] = "deathceg2", + [2] = "deathceg3", + [3] = "deathceg4", + }, + }, + sounds = { + canceldestruct = "cancel2", + underattack = "warning1", + cant = { + [1] = "cantdo4", + }, + count = { + [1] = "count6", + [2] = "count5", + [3] = "count4", + [4] = "count3", + [5] = "count2", + [6] = "count1", + }, + ok = { + [1] = "tcormove", + }, + select = { + [1] = "tcorsel", + }, + }, + weapondefs = { + legflak_gun = { + accuracy = 100, + areaofeffect = 42, + avoidfeature = false, + avoidfriendly = false, + burst = 3, + burstrate = 0.02, + burnblow = true, + canattackground = false, + collidefriendly = false, + craterareaofeffect = 192, + craterboost = 0, + cratermult = 0, + cylindertargeting = 1, + duration = 0.1, + edgeeffectiveness = 1, + gravityaffected = "true", + impulsefactor = 0, + mygravity = 0.01, + name = "Heavy Anti-Air Gatling Gun", + noselfdamage = true, + predictboost = 1, + range = 800, + reloadtime = 0.166, + smoketrail = false, + soundhit = "bimpact3", + soundhitwet = "splshbig", + soundstart = "minigun3", + soundhitvolume = 7.5, + soundstartvolume = 5, + stages = 0, + texture1 = "shot", + texture2 = "empty", + thickness = 2.5, + tolerance = 16000, + turret = true, + weapontimer = 1, + weapontype = "LaserCannon", + weaponvelocity = 3642, + damage = { + default = 1, + vtol = 26, + }, + rgbcolor = "1 0.33 0.7", + explosiongenerator = "custom:plasmahit-sparkonly", + fallOffRate = 0.2, + ownerExpAccWeight = 1.35,--does this affect sprayangle too? + sprayangle = 600, + }, + }, + weapons = { + [1] = { + badtargetcategory = "NOTAIR LIGHTAIRSCOUT", + burstcontrolwhenoutofarc = 2, + def = "legflak_gun", + fastautoretargeting = true, + onlytargetcategory = "VTOL", + }, + }, + }, +}