diff --git a/gamedata/armordefs.lua b/gamedata/armordefs.lua index 1a7d8169ace..c820a87a551 100644 --- a/gamedata/armordefs.lua +++ b/gamedata/armordefs.lua @@ -509,6 +509,7 @@ local armorDefs = { "armdroneold", "cordroneold", "legdrone", + "legheavydrone", "raptor_air_bomber_basic_t1_v1", "raptor_air_bomber_basic_t2_v1", "raptor_air_bomber_basic_t2_v2", diff --git a/gamedata/icontypes.lua b/gamedata/icontypes.lua index ca4fcd836be..ed9e35dcc17 100644 --- a/gamedata/icontypes.lua +++ b/gamedata/icontypes.lua @@ -2291,6 +2291,10 @@ local icontypes = { bitmap = "icons/air_hover.png", size = 0.5 }, + legheavydrone = { + bitmap = "icons/heavyheatraydrone.png", + size = 0.75 + }, legfhp = { bitmap = "icons/factory_hover.png", size = 1.52250004 diff --git a/icons/heavyheatraydrone.png b/icons/heavyheatraydrone.png new file mode 100644 index 00000000000..c4229a8040e Binary files /dev/null and b/icons/heavyheatraydrone.png differ diff --git a/icons/inverted/heavyheatraydrone.png b/icons/inverted/heavyheatraydrone.png new file mode 100644 index 00000000000..b24a10f124e Binary files /dev/null and b/icons/inverted/heavyheatraydrone.png differ diff --git a/language/en/units.json b/language/en/units.json index ebb01046ffe..44280da5325 100644 --- a/language/en/units.json +++ b/language/en/units.json @@ -700,7 +700,8 @@ "legdtl": "Dragon's Claw", "legdtm": "Dragon's Tail", "legforti": "Fortification Wall", - "legdrone": "Light Combat Drone", + "legdrone": "Legion Drone", + "legheavydrone": "Legion Heavy Drone", "legdtr": "Dragon's Jaw", "legeconv": "Energy Converter", "legfhp": "Naval Hovercraft Platform", @@ -1531,6 +1532,7 @@ "legdtm": "Pop-up Missile Turret", "legforti": "Advanced Fortification", "legdrone": "Light Combat Drone", + "legheavydrone": "Heavy Defense Drone", "legfhp": "Builds Hovercraft", "legfig": "Fighter / Scout Drone", "legfloat": "Heavy Convertible Tank/Boat", diff --git a/luarules/configs/gui_soundeffects.lua b/luarules/configs/gui_soundeffects.lua index e5ad5da7b77..49bb9699a61 100644 --- a/luarules/configs/gui_soundeffects.lua +++ b/luarules/configs/gui_soundeffects.lua @@ -2380,6 +2380,36 @@ GUIUnitSoundEffects = { BaseSoundMovementType = { "cor-com-ok-1", "cor-com-ok-2", "cor-com-ok-3", "cor-com-ok-4", }, BaseSoundWeaponType = "fastemg-small", }, + legcomlvl5 = { + BaseSoundSelectType = "cor-com-sel", + BaseSoundMovementType = { "cor-com-ok-1", "cor-com-ok-2", "cor-com-ok-3", "cor-com-ok-4", }, + BaseSoundWeaponType = "fastemg-small", + }, + legcomlvl6 = { + BaseSoundSelectType = "cor-com-sel", + BaseSoundMovementType = { "cor-com-ok-1", "cor-com-ok-2", "cor-com-ok-3", "cor-com-ok-4", }, + BaseSoundWeaponType = "fastemg-small", + }, + legcomlvl7 = { + BaseSoundSelectType = "cor-com-sel", + BaseSoundMovementType = { "cor-com-ok-1", "cor-com-ok-2", "cor-com-ok-3", "cor-com-ok-4", }, + BaseSoundWeaponType = "fastemg-small", + }, + legcomlvl8 = { + BaseSoundSelectType = "cor-com-sel", + BaseSoundMovementType = { "cor-com-ok-1", "cor-com-ok-2", "cor-com-ok-3", "cor-com-ok-4", }, + BaseSoundWeaponType = "fastemg-small", + }, + legcomlvl9 = { + BaseSoundSelectType = "cor-com-sel", + BaseSoundMovementType = { "cor-com-ok-1", "cor-com-ok-2", "cor-com-ok-3", "cor-com-ok-4", }, + BaseSoundWeaponType = "fastemg-small", + }, + legcomlvl10 = { + BaseSoundSelectType = "cor-com-sel", + BaseSoundMovementType = { "cor-com-ok-1", "cor-com-ok-2", "cor-com-ok-3", "cor-com-ok-4", }, + BaseSoundWeaponType = "fastemg-small", + }, -- LEGION T1 BUILDINGS diff --git a/luarules/gadgets/unit_continuous_aim.lua b/luarules/gadgets/unit_continuous_aim.lua index 399b35dc8fb..69019ddbd47 100644 --- a/luarules/gadgets/unit_continuous_aim.lua +++ b/luarules/gadgets/unit_continuous_aim.lua @@ -97,6 +97,7 @@ local convertedUnitsNames = { ['legmos'] = 5, ['leghades'] = 5, ['leghelios'] = 5, + ['legheavydrone'] = 5, ['legkeres'] = 5, ['legrail'] = 5, ['legbar'] = 5, diff --git a/luaui/Widgets/gfx_airjets_gl4.lua b/luaui/Widgets/gfx_airjets_gl4.lua index ac623cc146e..86d37156fb5 100644 --- a/luaui/Widgets/gfx_airjets_gl4.lua +++ b/luaui/Widgets/gfx_airjets_gl4.lua @@ -194,6 +194,9 @@ local effectDefs = { ["legmos"] = { { color = { 0.2, 0.8, 0.2 }, width = 2, length = 16, piece = "thrust", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, }, + ["legheavydrone"] = { + { color = { 0.2, 0.8, 0.2 }, width = 2, length = 16, piece = "thrusttrail", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, + }, ["corape"] = { { color = { 0.1, 0.4, 0.6 }, width = 4, length = 16, piece = "rthrust", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 4, length = 16, piece = "lthrust", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, diff --git a/luaui/configs/DeferredLightsGL4config.lua b/luaui/configs/DeferredLightsGL4config.lua index a09ec909ed3..4ad79864c17 100644 --- a/luaui/configs/DeferredLightsGL4config.lua +++ b/luaui/configs/DeferredLightsGL4config.lua @@ -20273,6 +20273,82 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, + ['legrail'] = { + eye = { + lightType = 'point', + pieceName = 'base', + lightConfig = { posx = 3.1, posy = 10.0, posz = 20.0, radius = 10.0, + color2r = 1, color2g = 0.2, color2b = 0.2, colortime = 0, + r = 0.2, g = 1, b = 0.2, a = 0.1, + modelfactor = 0.4, specular = 0, scattering = 0.7, lensflare = 0, + lifetime = 0, sustain = 0, animtype = 0}, + }, + capacitor = { + lightType = 'point', + pieceName = 'sleeve', + lightConfig = { posx = 1.0, posy = 2.0, posz = -8.0, radius = 10.0, + color2r = 1, color2g = 0.2, color2b = 0.2, colortime = 0, + r = 0.2, g = 1, b = 0.2, a = 0.1, + modelfactor = 0.4, specular = 0, scattering = 0.7, lensflare = 0, + lifetime = 0, sustain = 0, animtype = 0}, + }, + sleeveglow = { + lightType = 'point', + pieceName = 'barrel', + lightConfig = { posx = 0.0, posy = 0.0, posz = 0.0, radius = 8.0, + color2r = 1, color2g = 0.2, color2b = 0.2, colortime = 0, + r = 0.6, g = 0.3, b = 0.1, a = 0.25, + modelfactor = 0.4, specular = 0, scattering = 0.7, lensflare = 0, + lifetime = 0, sustain = 0, animtype = 0}, + }, + }, + ['legsrail'] = { + eye1 = { + lightType = 'point', + pieceName = 'pelvis', + lightConfig = { posx = -2.0, posy = 14.0, posz = 10.0, radius = 10.0, + color2r = 1, color2g = 0.2, color2b = 0.2, colortime = 0, + r = 0.2, g = 1, b = 0.2, a = 0.1, + modelfactor = 0.0, specular = 0, scattering = 0.7, lensflare = 0, + lifetime = 0, sustain = 0, animtype = 0}, + }, + eye2 = { + lightType = 'point', + pieceName = 'pelvis', + lightConfig = { posx = 0.0, posy = 14.0, posz = 10.0, radius = 10.0, + color2r = 1, color2g = 0.2, color2b = 0.2, colortime = 0, + r = 0.2, g = 1, b = 0.2, a = 0.1, + modelfactor = 0.0, specular = 0, scattering = 0.7, lensflare = 0, + lifetime = 0, sustain = 0, animtype = 0}, + }, + eye3 = { + lightType = 'point', + pieceName = 'pelvis', + lightConfig = { posx = 2.0, posy = 14.0, posz = 10.0, radius = 10.0, + color2r = 1, color2g = 0.2, color2b = 0.2, colortime = 0, + r = 0.2, g = 1, b = 0.2, a = 0.1, + modelfactor = 0.0, specular = 0, scattering = 0.7, lensflare = 0, + lifetime = 0, sustain = 0, animtype = 0}, + }, + capacitors = { + lightType = 'point', + pieceName = 'sleeve', + lightConfig = { posx = 0.0, posy = 3.5, posz = -2.0, radius = 20.0, + color2r = 1, color2g = 0.2, color2b = 0.2, colortime = 0, + r = 0.6, g = 0.3, b = 0.1, a = 0.2, + modelfactor = 0.4, specular = 0, scattering = 0.7, lensflare = 0, + lifetime = 0, sustain = 0, animtype = 0}, + }, + sleeveglow = { + lightType = 'point', + pieceName = 'barrel', + lightConfig = { posx = 0.0, posy = 0.0, posz = -4.0, radius = 8.0, + color2r = 1, color2g = 0.2, color2b = 0.2, colortime = 0, + r = 0.6, g = 0.3, b = 0.1, a = 0.25, + modelfactor = 0.4, specular = 0, scattering = 0.7, lensflare = 0, + lifetime = 0, sustain = 0, animtype = 0}, + }, + }, ['armgate'] = { shieldglow = { lightType = 'point', @@ -20483,6 +20559,20 @@ local unitEventLightsNames = { }, }, + ['legheavydrone'] = { + [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, + lightType = 'point', + pieceName = 'flare', + lightName = 'hvydronheatToroidGlow', + alwaysVisible = true, + lightConfig = { posx = 0, posy = 7, posz = 1, radius = 12, + color2r = 1, color2g = 0.92, color2b = 0.66, colortime = 160, + r = 0.88, g = 0.83, b = 0.2, a = 0.09, + modelfactor = 1.5, specular = 2, scattering = 2, lensflare = 0, + lifetime = 80, sustain = 5}, + }, + }, + ['leghelios'] = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', @@ -20807,6 +20897,57 @@ local unitEventLightsNames = { lifetime = 200, sustain = 15, animtype = 0}, }, }, + + ['legrail'] = { + [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, + lightType = 'point', + pieceName = 'flare', + lightName = 'railglow', + alwaysVisible = true, + lightConfig = { posx = 0, posy = 0, posz = 0, radius = 16, + color2r = 0.01, color2g = 0.1, color2b = 0.2, colortime = 550, + r = 0.5, g = 0.3, b = 0.1, a = 0.50, + modelfactor = 2, specular = 1, scattering = 0, lensflare = 1, + lifetime = 100, sustain = 5, animtype = 0}, + }, + [2] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, + lightType = 'point', + pieceName = 'flare', + lightName = 'railglowaa', + alwaysVisible = true, + lightConfig = { posx = 0, posy = 0, posz = 0, radius = 16, + color2r = 0.01, color2g = 0.1, color2b = 0.2, colortime = 550, + r = 1.0, g = 0.33, b = 0.7, a = 0.50, + modelfactor = 2, specular = 1, scattering = 0, lensflare = 1, + lifetime = 100, sustain = 5, animtype = 0}, + }, + }, + + ['legsrail'] = { + [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, + lightType = 'point', + pieceName = 'flare1', + lightName = 'railglowt2', + alwaysVisible = true, + lightConfig = { posx = 0, posy = 0, posz = 0, radius = 24, + color2r = 0.01, color2g = 0.1, color2b = 0.2, colortime = 550, + r = 0.5, g = 0.3, b = 0.1, a = 0.50, + modelfactor = 2, specular = 1, scattering = 0, lensflare = 1, + lifetime = 100, sustain = 5, animtype = 0}, + }, + [2] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, + lightType = 'point', + pieceName = 'flare1', + lightName = 'railglowt2aa', + alwaysVisible = true, + lightConfig = { posx = 0, posy = 0, posz = 0, radius = 24, + color2r = 0.01, color2g = 0.1, color2b = 0.2, colortime = 550, + r = 1.0, g = 0.33, b = 0.7, a = 0.50, + modelfactor = 2, specular = 1, scattering = 0, lensflare = 1, + lifetime = 100, sustain = 5, animtype = 0}, + }, + }, + ['legphoenix'] = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', @@ -20949,7 +21090,6 @@ local unitEventLightsNames = { }, }, - ['armraz'] = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', @@ -21082,6 +21222,8 @@ local unitEventLightsNames = { }, + + ------------------------------- Put additional lights tied to events here! -------------------------------- UnitIdle = { ['armcom'] = { diff --git a/objects3d/Units/legcv.s3o b/objects3d/Units/legcv.s3o index 01d04ca73a8..de633fa2e4b 100644 Binary files a/objects3d/Units/legcv.s3o and b/objects3d/Units/legcv.s3o differ diff --git a/objects3d/Units/legcv_dead.s3o b/objects3d/Units/legcv_dead.s3o index 004456df19e..ba74b02bcb0 100644 Binary files a/objects3d/Units/legcv_dead.s3o and b/objects3d/Units/legcv_dead.s3o differ diff --git a/objects3d/Units/leggob.s3o b/objects3d/Units/leggob.s3o index 705b830405e..8fc247a65ff 100644 Binary files a/objects3d/Units/leggob.s3o and b/objects3d/Units/leggob.s3o differ diff --git a/objects3d/Units/leggob_dead.s3o b/objects3d/Units/leggob_dead.s3o index 7aeb580eb67..602f1d86414 100644 Binary files a/objects3d/Units/leggob_dead.s3o and b/objects3d/Units/leggob_dead.s3o differ diff --git a/objects3d/Units/legheavydrone.s3o b/objects3d/Units/legheavydrone.s3o new file mode 100644 index 00000000000..df23daaa602 Binary files /dev/null and b/objects3d/Units/legheavydrone.s3o differ diff --git a/objects3d/Units/legsilo.s3o b/objects3d/Units/legsilo.s3o index bd388b7713e..21098a4b194 100644 Binary files a/objects3d/Units/legsilo.s3o and b/objects3d/Units/legsilo.s3o differ diff --git a/objects3d/Units/legsrail.s3o b/objects3d/Units/legsrail.s3o index ddc250ac868..7c980be7016 100644 Binary files a/objects3d/Units/legsrail.s3o and b/objects3d/Units/legsrail.s3o differ diff --git a/scripts/Units/legcv.bos b/scripts/Units/legcv.bos index c4dde9e788e..0e9fd82251e 100644 --- a/scripts/Units/legcv.bos +++ b/scripts/Units/legcv.bos @@ -3,7 +3,7 @@ #define SIGNAL_MOVE 1 #define SIGNAL_BUILD 2 -piece base, mlwheel, mrwheel, blwheel, brwheel, flwheel, frwheel, arml, armr, lpanel, rpanel, solar, loturret, upturret, nano, beam, cagelight, cagelight_emit; +piece base, mlwheel, mrwheel, blwheel, brwheel, flwheel, frwheel, arml, armr, lpanel, rpanel, solar, cylinderdeco, loturret, upturret, nano, beam, cagelight, cagelight_emit; static-var restore_delay, readyToBuild, currentSpeed, moveSpeed, wheelSpeed, oldHeading; @@ -82,6 +82,7 @@ Create() oldheading = get HEADING; start-script Steering(); SLEEP_UNTIL_UNITFINISHED; + spin cylinderdeco around x-axis speed <30>; set INBUILDSTANCE to FALSE; } @@ -118,6 +119,8 @@ StartBuilding(heading, pitch) show cagelight_emit; spin cagelight_emit around y-axis speed <250>; + spin cylinderdeco around x-axis speed <240> accelerate <10>; + readyToBuild = 1; } @@ -128,6 +131,8 @@ StopBuilding() hide cagelight_emit; turn cagelight to y-axis <0> speed <1000>; + + spin cylinderdeco around x-axis speed <30> accelerate <10>; sleep 6000; set INBUILDSTANCE to FALSE; diff --git a/scripts/Units/legcv.cob b/scripts/Units/legcv.cob index 77fbc242a2e..ed5a8de31d0 100644 Binary files a/scripts/Units/legcv.cob and b/scripts/Units/legcv.cob differ diff --git a/scripts/Units/leggob.bos b/scripts/Units/leggob.bos index 4988b9704d3..40015f4f19c 100644 --- a/scripts/Units/leggob.bos +++ b/scripts/Units/leggob.bos @@ -1,12 +1,9 @@ -#define TA // This is a TA script -#include "sfxtype.h" -#include "exptype.h" +#include "../recoil_common_includes.h" -piece torso, torso2, lfire, rfire, gun, pelvis, rleg, - rfoot, lleg, lfoot, lthigh, rthigh, aimx1, aimy1; +piece torso, flare, sleeve, pelvis, rleg, rfoot, lleg, lfoot, lthigh, rthigh, aimx1, aimy1, lbarrel; -static-var bMoving, bAiming, gun_1, wpnheading, animSpeed, maxSpeed, animFramesPerKeyframe, StompXZ, StompHeading; +static-var isMoving, isAiming, wpnheading, animSpeed, maxSpeed, animFramesPerKeyframe, StompXZ, StompHeading; lua_UnitScriptDecal(lightIndex, xpos,zpos, heading) { @@ -14,306 +11,163 @@ lua_UnitScriptDecal(lightIndex, xpos,zpos, heading) } // Signal definitions -#define SIG_AIM 4 -#define SIG_WALK 2 -#define SIG_FIRE1 8 -Walk() {//Created by https://github.com/Beherith/Skeletor_S3O from N:\animations\corthud_anim_walk.blend - set-signal-mask SIG_WALK; - if (bMoving) { //Frame:4 - turn gun to x-axis <-6.599999> speed <197.999970> / animSpeed; - turn lfoot to x-axis <-19.636401> speed <576.401349> / animSpeed; - turn lfoot to z-axis <-11.014305> speed <147.893476> / animSpeed; - turn lfoot to y-axis <1.522653> speed <50.700078> / animSpeed; - turn lleg to x-axis <-22.882737> speed <686.482113> / animSpeed; - turn lleg to z-axis <3.302126> speed <99.063781> / animSpeed; - turn lleg to y-axis <2.594710> speed <77.841290> / animSpeed; - turn lthigh to x-axis <40.929673> speed <1227.890189> / animSpeed; - turn lthigh to z-axis <13.142189> speed <394.265669> / animSpeed; - turn lthigh to y-axis <-6.410377> speed <627.692575> / animSpeed; - turn rfoot to x-axis <20.280490> speed <626.282720> / animSpeed; - turn rfoot to z-axis <-1.502973> speed <246.114015> / animSpeed; - turn rfoot to y-axis <0.474751> speed <5.886180> / animSpeed; - turn rleg to x-axis <11.111350> speed <333.340501> / animSpeed; - turn rleg to z-axis <-1.482851> speed <44.485515> / animSpeed; - turn rleg to y-axis <-0.901252> speed <27.037563> / animSpeed; - turn rthigh to x-axis <-41.279464> speed <1238.383921> / animSpeed; - turn rthigh to z-axis <0.106346> speed <3.190367> / animSpeed; - turn rthigh to y-axis <3.073403> speed <590.945515> / animSpeed; - turn torso to x-axis <-3.343591> speed <103.692254> / animSpeed; - turn torso to z-axis <-0.423710> speed <12.711288> / animSpeed; - turn torso to y-axis <-6.065435> speed <181.963053> / animSpeed; - sleep 131; - } - while(bMoving) { - if (bMoving) { //Frame:8 - turn gun to x-axis <-10.600000> speed <120.000037> / animSpeed; - turn lfoot to x-axis <7.944267> speed <827.420053> / animSpeed; - turn lfoot to z-axis <-9.756190> speed <37.743446> / animSpeed; - turn lfoot to y-axis <-7.350180> speed <266.184994> / animSpeed; - turn lleg to x-axis <-6.173776> speed <501.268847> / animSpeed; - turn lleg to z-axis <-2.468694> speed <173.124613> / animSpeed; - turn lleg to y-axis <-1.233904> speed <114.858423> / animSpeed; - turn lthigh to x-axis <49.833368> speed <267.110837> / animSpeed; - turn lthigh to z-axis <3.108793> speed <301.001890> / animSpeed; - turn lthigh to y-axis <-1.909480> speed <135.026891> / animSpeed; - move pelvis to y-axis [-0.950000] speed [28.500000] / animSpeed; - turn pelvis to x-axis <4.014409> speed <120.432273> / animSpeed; - turn pelvis to y-axis <9.190592> speed <275.717772> / animSpeed; - turn rfoot to x-axis <39.151758> speed <566.138039> / animSpeed; - turn rfoot to z-axis <15.473206> speed <509.285362> / animSpeed; - turn rfoot to y-axis <-20.348790> speed <624.706219> / animSpeed; - turn rleg to x-axis <-34.993282> speed <1383.138971> / animSpeed; - turn rleg to z-axis <1.770067> speed <97.587532> / animSpeed; - turn rleg to y-axis <9.414717> speed <309.479059> / animSpeed; - turn rthigh to x-axis <-31.744390> speed <286.052216> / animSpeed; - turn rthigh to z-axis <3.626211> speed <105.595977> / animSpeed; - turn rthigh to y-axis <5.327848> speed <67.633363> / animSpeed; - turn torso to x-axis <0.112818> speed <103.692252> / animSpeed; - turn torso to z-axis <-0.847419> speed <12.711288> / animSpeed; - turn torso to y-axis <-12.130870> speed <181.963053> / animSpeed; - sleep ((33*animSpeed) -1); +#define SIGNAL_AIM1 256 +#define SIGNAL_SHOOT1 16 +#define SIGNAL_MOVE 1 +Walk() {// For C:\Users\logst\Downloads\BAR\leggob anim.blend Created by https://github.com/Beherith/Skeletor_S3O V((0, 4, 2)) + set-signal-mask SIGNAL_MOVE; + if (isMoving) { //Frame:0 + turn lleg to x-axis <-71.521424> speed <3111.455896> / animSpeed; + turn lthigh to x-axis <51.030625> speed <396.927496> / animSpeed; + move pelvis to z-axis [0.141120] speed [19.266197] / animSpeed; + move pelvis to y-axis [-1.524772] speed [73.292989] / animSpeed; + turn pelvis to z-axis <5.258405> speed <54.471465> / animSpeed; + turn pelvis to y-axis <3.193136> speed <163.106589> / animSpeed; + turn rfoot to x-axis <30.683566> speed <849.471669> / animSpeed; + turn rleg to x-axis <-19.265524> speed <2518.031695> / animSpeed; + turn rthigh to x-axis <-13.340162> speed <2180.792556> / animSpeed; + turn sleeve to x-axis <-17.547897> speed <339.418977> / animSpeed; + turn torso to y-axis <-1.985973> speed <187.661178> / animSpeed; + + turn rthigh to y-axis <2> speed <6103.098526> / animSpeed; + turn lthigh to y-axis <-2> speed <6103.098526> / animSpeed; + turn pelvis to x-axis <5> speed <519.266197> / animSpeed; + sleep ((15*animSpeed) -1); } - if (bMoving) { //Frame:12 - turn gun to x-axis <-0.000001> speed <317.999982> / animSpeed; - turn lfoot to x-axis <-20.910981> speed <865.657450> / animSpeed; - turn lfoot to z-axis <-3.878097> speed <176.342797> / animSpeed; - turn lfoot to y-axis <-15.547735> speed <245.926664> / animSpeed; - turn lleg to x-axis <32.817485> speed <1169.737805> / animSpeed; - turn lleg to z-axis <3.044538> speed <165.396973> / animSpeed; - turn lleg to y-axis <-4.104570> speed <86.119960> / animSpeed; - turn lthigh to x-axis <10.185038> speed <1189.449884> / animSpeed; - turn lthigh to z-axis <-2.941290> speed <181.502469> / animSpeed; - turn lthigh to y-axis <0.737880> speed <79.420814> / animSpeed; - move pelvis to z-axis [0.556818] speed [16.704531] / animSpeed; - move pelvis to y-axis [-1.381859] speed [12.955783] / animSpeed; - turn pelvis to x-axis <8.125114> speed <123.321136> / animSpeed; - turn pelvis to y-axis <6.746421> speed <73.325137> / animSpeed; - turn rfoot to x-axis <20.469391> speed <560.471014> / animSpeed; - turn rfoot to z-axis <9.908131> speed <166.952252> / animSpeed; - turn rfoot to y-axis <-3.628238> speed <501.616559> / animSpeed; - turn rleg to x-axis <11.338249> speed <1389.945938> / animSpeed; - turn rleg to z-axis <-0.939371> speed <81.283152> / animSpeed; - turn rleg to y-axis <-1.633650> speed <331.450992> / animSpeed; - turn rthigh to x-axis <-38.191341> speed <193.408520> / animSpeed; - turn rthigh to z-axis <-1.591400> speed <156.528351> / animSpeed; - turn rthigh to y-axis <4.223383> speed <33.133952> / animSpeed; - turn torso to z-axis <-0.590221> speed <7.715946> / animSpeed; - turn torso to y-axis <-8.445438> speed <110.562953> / animSpeed; + while(isMoving) { + if (isMoving) { //Frame:5 + turn lfoot to x-axis <2.367844> speed <199.547443> / animSpeed; + turn lleg to x-axis <-39.798764> speed <951.679798> / animSpeed; + turn lthigh to x-axis <-50.687684> speed <3051.549263> / animSpeed; + move pelvis to z-axis [-0.925815] speed [32.008055] / animSpeed; + move pelvis to y-axis [0.621222] speed [64.379818] / animSpeed; + turn pelvis to z-axis <1.790172> speed <104.046968> / animSpeed; + turn pelvis to y-axis <-5.452400> speed <259.366075> / animSpeed; + turn rfoot to x-axis <1.126613> speed <886.708591> / animSpeed; + turn rleg to x-axis <1.194342> speed <613.795961> / animSpeed; + turn rthigh to x-axis <26.697960> speed <1201.143646> / animSpeed; + turn sleeve to x-axis <3.232050> speed <623.398399> / animSpeed; + turn torso to y-axis <6.265018> speed <247.529737> / animSpeed; sleep ((33*animSpeed) -1); } - if (bMoving) { //Frame:16 - turn gun to x-axis <-2.900001> speed <86.999991> / animSpeed; - turn lfoot to x-axis <-13.641220> speed <218.092841> / animSpeed; - turn lfoot to z-axis <0.698070> speed <137.285005> / animSpeed; - turn lfoot to y-axis <-9.595372> speed <178.570916> / animSpeed; - turn lleg to x-axis <37.087907> speed <128.112663> / animSpeed; - turn lleg to z-axis <1.981463> speed <31.892243> / animSpeed; - turn lleg to y-axis <-1.709907> speed <71.839888> / animSpeed; - turn lthigh to x-axis <-28.749806> speed <1168.045335> / animSpeed; - turn lthigh to z-axis <-5.231971> speed <68.720439> / animSpeed; - turn lthigh to y-axis <-0.812102> speed <46.499450> / animSpeed; - move pelvis to z-axis [0.202479] speed [10.630156] / animSpeed; - move pelvis to y-axis [-0.622563] speed [22.778907] / animSpeed; - turn pelvis to x-axis <3.814975> speed <129.304151> / animSpeed; - turn pelvis to y-axis <2.885238> speed <115.835496> / animSpeed; - turn rfoot to x-axis <-5.308605> speed <773.339874> / animSpeed; - turn rfoot to z-axis <11.849091> speed <58.228788> / animSpeed; - turn rfoot to y-axis <-8.066427> speed <133.145671> / animSpeed; - turn rleg to x-axis <9.306979> speed <60.938103> / animSpeed; - turn rleg to z-axis <-3.463636> speed <75.727954> / animSpeed; - turn rleg to y-axis <-2.342969> speed <21.279586> / animSpeed; - turn rthigh to x-axis <-8.053329> speed <904.140349> / animSpeed; - turn rthigh to z-axis <-7.745611> speed <184.626330> / animSpeed; - turn rthigh to y-axis <3.236615> speed <29.603037> / animSpeed; - turn torso to z-axis <-0.024385> speed <16.975080> / animSpeed; - turn torso to y-axis <-0.337490> speed <243.238443> / animSpeed; + if (isMoving) { //Frame:10 + turn lleg to x-axis <64.668866> speed <3134.028920> / animSpeed; + turn lthigh to x-axis <-86.020284> speed <1059.977979> / animSpeed; + move pelvis to z-axis [0.793668] speed [51.584480] / animSpeed; + move pelvis to y-axis [0.897529] speed [8.289195] / animSpeed; + turn pelvis to z-axis <-3.476930> speed <158.013066> / animSpeed; + turn pelvis to y-axis <-8.619049> speed <94.999483> / animSpeed; + turn rfoot to x-axis <9.019425> speed <236.784365> / animSpeed; + turn rleg to x-axis <32.193772> speed <929.982912> / animSpeed; + turn rthigh to x-axis <37.799708> speed <333.052455> / animSpeed; + turn sleeve to x-axis <-6.233931> speed <283.979422> / animSpeed; + turn torso to y-axis <8.220560> speed <58.666236> / animSpeed; sleep ((33*animSpeed) -1); } - if (bMoving) { //Frame:20 - turn gun to x-axis <-6.599999> speed <110.999953> / animSpeed; - turn lfoot to x-axis <20.034712> speed <1010.277954> / animSpeed; - turn lfoot to z-axis <1.499531> speed <24.043838> / animSpeed; - turn lfoot to y-axis <-0.466431> speed <273.868209> / animSpeed; - turn lleg to x-axis <11.560504> speed <765.822077> / animSpeed; - turn lleg to z-axis <2.249283> speed <8.034582> / animSpeed; - turn lleg to y-axis <0.745859> speed <73.672989> / animSpeed; - turn lthigh to x-axis <-41.089865> speed <370.201751> / animSpeed; - turn lthigh to z-axis <0.235525> speed <164.024892> / animSpeed; - turn lthigh to y-axis <-1.978531> speed <34.992890> / animSpeed; - move pelvis to z-axis [0.000000] speed [6.074375] / animSpeed; - move pelvis to y-axis [0.000000] speed [18.676876] / animSpeed; - turn pelvis to x-axis <-0.000000> speed <114.449258> / animSpeed; - turn pelvis to y-axis <-0.000000> speed <86.557139> / animSpeed; - turn rfoot to x-axis <-20.376049> speed <452.023315> / animSpeed; - turn rfoot to z-axis <11.064463> speed <23.538821> / animSpeed; - turn rfoot to y-axis <-1.372614> speed <200.814375> / animSpeed; - turn rleg to x-axis <-22.931081> speed <967.141801> / animSpeed; - turn rleg to z-axis <-4.680035> speed <36.491959> / animSpeed; - turn rleg to y-axis <-2.537048> speed <5.822356> / animSpeed; - turn rthigh to x-axis <41.440390> speed <1484.811579> / animSpeed; - turn rthigh to z-axis <-12.350508> speed <138.146894> / animSpeed; - turn rthigh to y-axis <4.809287> speed <47.180153> / animSpeed; - turn torso to z-axis <0.541451> speed <16.975075> / animSpeed; - turn torso to y-axis <7.770459> speed <243.238468> / animSpeed; + if (isMoving) { //Frame:15 + turn lfoot to x-axis <30.683566> speed <849.471669> / animSpeed; + turn lleg to x-axis <-19.265524> speed <2518.031695> / animSpeed; + turn lthigh to x-axis <-13.340162> speed <2180.403645> / animSpeed; + move pelvis to z-axis [0.124455] speed [20.076376] / animSpeed; + move pelvis to y-axis [-1.527450] speed [72.749351] / animSpeed; + turn pelvis to z-axis <-5.250210> speed <53.198412> / animSpeed; + turn pelvis to y-axis <-3.124782> speed <164.828020> / animSpeed; + turn rleg to x-axis <-71.521424> speed <3111.455896> / animSpeed; + turn rthigh to x-axis <51.030625> speed <396.927496> / animSpeed; + turn sleeve to x-axis <-17.497497> speed <337.906978> / animSpeed; + turn torso to y-axis <1.915606> speed <189.148595> / animSpeed; sleep ((33*animSpeed) -1); } - if (bMoving) { //Frame:24 - turn gun to x-axis <-10.600000> speed <120.000037> / animSpeed; - turn lfoot to x-axis <39.860813> speed <594.783033> / animSpeed; - turn lfoot to z-axis <-15.635314> speed <514.045353> / animSpeed; - turn lfoot to y-axis <20.602533> speed <632.068933> / animSpeed; - turn lleg to x-axis <-35.596566> speed <1414.712093> / animSpeed; - turn lleg to z-axis <-1.072036> speed <99.639572> / animSpeed; - turn lleg to y-axis <-7.678853> speed <252.741374> / animSpeed; - turn lthigh to x-axis <-31.795794> speed <278.822119> / animSpeed; - turn lthigh to z-axis <-2.060410> speed <68.878075> / animSpeed; - turn lthigh to y-axis <-4.882766> speed <87.127046> / animSpeed; - move pelvis to y-axis [-0.950000] speed [28.500000] / animSpeed; - turn pelvis to x-axis <4.014409> speed <120.432273> / animSpeed; - turn pelvis to y-axis <-8.099956> speed <242.998690> / animSpeed; - turn rfoot to x-axis <8.569539> speed <868.367635> / animSpeed; - turn rfoot to z-axis <9.771561> speed <38.787082> / animSpeed; - turn rfoot to y-axis <7.240249> speed <258.385903> / animSpeed; - turn rleg to x-axis <-6.475375> speed <493.671188> / animSpeed; - turn rleg to z-axis <1.604088> speed <188.523690> / animSpeed; - turn rleg to y-axis <1.016681> speed <106.611859> / animSpeed; - turn rthigh to x-axis <50.993031> speed <286.579233> / animSpeed; - turn rthigh to z-axis <-2.608810> speed <292.250926> / animSpeed; - turn rthigh to y-axis <0.580910> speed <126.851300> / animSpeed; - turn torso to z-axis <0.798649> speed <7.715941> / animSpeed; - turn torso to y-axis <11.455892> speed <110.563004> / animSpeed; + if (isMoving) { //Frame:20 + turn lfoot to x-axis <1.126613> speed <886.708591> / animSpeed; + turn lleg to x-axis <1.194342> speed <613.795961> / animSpeed; + turn lthigh to x-axis <26.697960> speed <1201.143646> / animSpeed; + move pelvis to z-axis [-0.919329] speed [31.313516] / animSpeed; + move pelvis to y-axis [0.644726] speed [65.165284] / animSpeed; + turn pelvis to z-axis <-1.747777> speed <105.073008> / animSpeed; + turn pelvis to y-axis <5.509447> speed <259.026860> / animSpeed; + turn rleg to x-axis <-39.798764> speed <951.679798> / animSpeed; + turn rthigh to x-axis <-50.687684> speed <3051.549263> / animSpeed; + turn sleeve to x-axis <3.175584> speed <620.192412> / animSpeed; + turn torso to y-axis <-6.314259> speed <246.895971> / animSpeed; sleep ((33*animSpeed) -1); } - if (bMoving) { //Frame:28 - turn gun to x-axis <-0.000001> speed <317.999982> / animSpeed; - turn lfoot to x-axis <21.389480> speed <554.139992> / animSpeed; - turn lfoot to z-axis <-9.970639> speed <169.940238> / animSpeed; - turn lfoot to y-axis <3.801959> speed <504.017234> / animSpeed; - turn lleg to x-axis <10.244273> speed <1375.225156> / animSpeed; - turn lleg to z-axis <2.313724> speed <101.572812> / animSpeed; - turn lleg to y-axis <1.448232> speed <273.812543> / animSpeed; - turn lthigh to x-axis <-38.336807> speed <196.230379> / animSpeed; - turn lthigh to z-axis <2.786143> speed <145.396617> / animSpeed; - turn lthigh to y-axis <-2.949849> speed <57.987512> / animSpeed; - move pelvis to z-axis [0.556818] speed [16.704531] / animSpeed; - move pelvis to y-axis [-1.381859] speed [12.955783] / animSpeed; - turn pelvis to x-axis <8.125114> speed <123.321136> / animSpeed; - turn pelvis to y-axis <-4.770867> speed <99.872691> / animSpeed; - turn rfoot to x-axis <-20.596466> speed <874.980146> / animSpeed; - turn rfoot to z-axis <3.870100> speed <177.043818> / animSpeed; - turn rfoot to y-axis <12.899483> speed <169.777030> / animSpeed; - turn rleg to x-axis <33.873323> speed <1210.460925> / animSpeed; - turn rleg to z-axis <-1.946575> speed <106.519901> / animSpeed; - turn rleg to y-axis <1.629631> speed <18.388495> / animSpeed; - turn rthigh to x-axis <12.704178> speed <1148.665587> / animSpeed; - turn rthigh to z-axis <1.492647> speed <123.043719> / animSpeed; - turn rthigh to y-axis <-0.753182> speed <40.022774> / animSpeed; - turn torso to z-axis <0.541451> speed <7.715947> / animSpeed; - turn torso to y-axis <7.770460> speed <110.562953> / animSpeed; + if (isMoving) { //Frame:25 + turn lfoot to x-axis <9.019425> speed <236.784365> / animSpeed; + turn lleg to x-axis <32.193772> speed <929.982912> / animSpeed; + turn lthigh to x-axis <37.799708> speed <333.052455> / animSpeed; + move pelvis to z-axis [0.803784] speed [51.693376] / animSpeed; + move pelvis to y-axis [0.876476] speed [6.952502] / animSpeed; + turn pelvis to z-axis <3.510924> speed <157.761025> / animSpeed; + turn pelvis to y-axis <8.607464> speed <92.940514> / animSpeed; + turn rfoot to x-axis <2.367844> speed <199.547443> / animSpeed; + turn rleg to x-axis <64.666325> speed <3133.952695> / animSpeed; + turn rthigh to x-axis <-86.020284> speed <1059.977979> / animSpeed; + turn sleeve to x-axis <-6.233931> speed <282.285435> / animSpeed; + turn torso to y-axis <-8.199190> speed <56.547909> / animSpeed; sleep ((33*animSpeed) -1); } - if (bMoving) { //Frame:32 - turn gun to x-axis <-2.900001> speed <86.999991> / animSpeed; - turn lfoot to x-axis <-4.635911> speed <780.761724> / animSpeed; - turn lfoot to z-axis <-11.836854> speed <55.986429> / animSpeed; - turn lfoot to y-axis <8.208373> speed <132.192425> / animSpeed; - turn lleg to x-axis <8.596608> speed <49.429959> / animSpeed; - turn lleg to z-axis <3.944391> speed <48.920013> / animSpeed; - turn lleg to y-axis <1.930907> speed <14.480252> / animSpeed; - turn lthigh to x-axis <-8.388484> speed <898.449683> / animSpeed; - turn lthigh to z-axis <7.778458> speed <149.769451> / animSpeed; - turn lthigh to y-axis <-3.052946> speed <3.092917> / animSpeed; - move pelvis to z-axis [0.202479] speed [10.630156] / animSpeed; - move pelvis to y-axis [-0.622563] speed [22.778907] / animSpeed; - turn pelvis to x-axis <3.814975> speed <129.304151> / animSpeed; - turn pelvis to y-axis <-1.703881> speed <92.009570> / animSpeed; - turn rfoot to x-axis <-13.882681> speed <201.413545> / animSpeed; - turn rfoot to z-axis <-0.700750> speed <137.125513> / animSpeed; - turn rfoot to y-axis <4.341740> speed <256.732314> / animSpeed; - turn rleg to x-axis <38.347544> speed <134.226639> / animSpeed; - turn rleg to z-axis <1.177458> speed <93.721003> / animSpeed; - turn rleg to y-axis <-2.240978> speed <116.118250> / animSpeed; - turn rthigh to x-axis <-27.842240> speed <1216.392547> / animSpeed; - turn rthigh to z-axis <3.461246> speed <59.057959> / animSpeed; - turn rthigh to y-axis <2.335601> speed <92.663495> / animSpeed; - turn torso to z-axis <-0.024385> speed <16.975078> / animSpeed; - turn torso to y-axis <-0.337488> speed <243.238455> / animSpeed; - sleep ((33*animSpeed) -1); - } - if (bMoving) { //Frame:36 - turn gun to x-axis <-6.599999> speed <110.999953> / animSpeed; - turn lfoot to x-axis <-19.636401> speed <450.014715> / animSpeed; - turn lfoot to z-axis <-11.014305> speed <24.676457> / animSpeed; - turn lfoot to y-axis <1.522653> speed <200.571590> / animSpeed; - turn lleg to x-axis <-22.882737> speed <944.380340> / animSpeed; - turn lleg to z-axis <3.302126> speed <19.267953> / animSpeed; - turn lleg to y-axis <2.594710> speed <19.914085> / animSpeed; - turn lthigh to x-axis <40.929673> speed <1479.544709> / animSpeed; - turn lthigh to z-axis <13.142189> speed <160.911914> / animSpeed; - turn lthigh to y-axis <-6.410377> speed <100.722915> / animSpeed; - move pelvis to z-axis [0.000000] speed [6.074375] / animSpeed; - move pelvis to y-axis [0.000000] speed [18.676876] / animSpeed; - turn pelvis to x-axis <-0.000000> speed <114.449258> / animSpeed; - turn pelvis to y-axis <-0.000000> speed <51.116429> / animSpeed; - turn rfoot to x-axis <20.280490> speed <1024.895131> / animSpeed; - turn rfoot to z-axis <-1.502973> speed <24.066665> / animSpeed; - turn rfoot to y-axis <0.474751> speed <116.009663> / animSpeed; - turn rleg to x-axis <11.111350> speed <817.085814> / animSpeed; - turn rleg to z-axis <-1.482851> speed <79.809259> / animSpeed; - turn rleg to y-axis <-0.901252> speed <40.191771> / animSpeed; - turn rthigh to x-axis <-41.279464> speed <403.116723> / animSpeed; - turn rthigh to z-axis <0.106346> speed <100.647005> / animSpeed; - turn rthigh to y-axis <3.073403> speed <22.134052> / animSpeed; - turn torso to x-axis <-3.343591> speed <103.201652> / animSpeed; - turn torso to z-axis <-0.423710> speed <11.979729> / animSpeed; - turn torso to y-axis <-6.065435> speed <171.838407> / animSpeed; + if (isMoving) { //Frame:30 + turn lleg to x-axis <-71.521424> speed <3111.455896> / animSpeed; + turn lthigh to x-axis <51.030625> speed <396.927496> / animSpeed; + move pelvis to z-axis [0.141120] speed [19.266197] / animSpeed; + move pelvis to y-axis [-1.524772] speed [73.292989] / animSpeed; + turn pelvis to z-axis <5.258405> speed <54.471465> / animSpeed; + turn pelvis to y-axis <3.193136> speed <163.106589> / animSpeed; + turn rfoot to x-axis <30.683566> speed <849.471669> / animSpeed; + turn rleg to x-axis <-19.265524> speed <2518.031695> / animSpeed; + turn rthigh to x-axis <-13.340162> speed <2180.792556> / animSpeed; + turn sleeve to x-axis <-17.547897> speed <339.418977> / animSpeed; + turn torso to y-axis <-1.985973> speed <187.661178> / animSpeed; sleep ((33*animSpeed) -1); } } } -// Call this from MotionControl()! +// Call this from StopMoving()! StopWalking() { - move pelvis to y-axis [0.000000] speed [7.125000]; - move pelvis to z-axis [0.000000] speed [4.176133]; - turn gun to x-axis <0.000000> speed <79.499995>; - turn lfoot to x-axis <-0.423023> speed <252.569489>; - turn lfoot to y-axis <-0.167349> speed <158.017233>; - turn lfoot to z-axis <-6.084522> speed <128.511338>; - turn lleg to x-axis <0.000000> speed <353.678023>; - turn lleg to y-axis <0.000000> speed <68.453136>; - turn lleg to z-axis <0.000000> speed <43.281153>; - turn lthigh to x-axis <0.000000> speed <369.886177>; - turn lthigh to y-axis <14.512709> speed <156.923144>; - turn lthigh to z-axis <0.000000> speed <98.566417>; - turn pelvis to x-axis <0.000000> speed <32.326038>; - turn pelvis to y-axis <0.000000> speed <68.929443>; - turn rfoot to x-axis <-0.595601> speed <256.223783>; - turn rfoot to y-axis <0.278545> speed <156.176555>; - turn rfoot to z-axis <6.700828> speed <127.321340>; - turn rleg to x-axis <0.000000> speed <347.486484>; - turn rleg to y-axis <0.000000> speed <82.862748>; - turn rleg to z-axis <0.000000> speed <47.130923>; - turn rthigh to x-axis <0.000000> speed <371.202895>; - turn rthigh to y-axis <-16.624781> speed <147.736379>; - turn rthigh to z-axis <0.000000> speed <73.062732>; - turn torso to x-axis <-6.799999> speed <25.923064>; - turn torso to y-axis <0.000000> speed <60.809617>; - turn torso to z-axis <0.000000> speed <4.243770>; + animSpeed = 10; // tune restore speed here, higher values are slower restore speeds + move pelvis to y-axis [0] speed [146.585977] / animSpeed; + move pelvis to z-axis [0] speed [103.386751] / animSpeed; + turn lfoot to x-axis <0> speed <1773.417182> / animSpeed; + turn lleg to x-axis <0> speed <6268.057839> / animSpeed; + turn lthigh to x-axis <0> speed <6103.098526> / animSpeed; + turn pelvis to y-axis <0> speed <518.732151> / animSpeed; + turn pelvis to z-axis <0> speed <316.026132> / animSpeed; + turn rfoot to x-axis <0> speed <1773.417182> / animSpeed; + turn rleg to x-axis <0> speed <6267.905390> / animSpeed; + turn rthigh to x-axis <0> speed <6103.098526> / animSpeed; + turn sleeve to x-axis <0> speed <1246.796797> / animSpeed; + turn torso to y-axis <0> speed <495.059475> / animSpeed; + + turn rthigh to y-axis <-10> speed <6103.098526> / animSpeed; + turn lthigh to y-axis <10> speed <6103.098526> / animSpeed; + turn pelvis to x-axis <0> speed <519.266197> / animSpeed; } - +// REMEMBER TO animspeed = 5 in Create() !! UnitSpeed(){ - maxSpeed = get MAX_SPEED; // this returns cob units per frame i think - animFramesPerKeyframe = 4; //we need to calc the frames per keyframe value, from the known animtime - maxSpeed = maxSpeed + (maxSpeed /(2*animFramesPerKeyframe)); // add fudge - while(TRUE){ - animSpeed = (get CURRENT_SPEED); - if (animSpeed<1) animSpeed=1; - animSpeed = (maxSpeed * 3) / animSpeed; - //get PRINT(maxSpeed, animFramesPerKeyframe, animSpeed); - if (animSpeed<2) animSpeed=2; - if (animspeed>8) animSpeed = 8; - sleep 131; - } + maxSpeed = get MAX_SPEED; // this returns cob units per frame i think + animFramesPerKeyframe = 5; //we need to calc the frames per keyframe value, from the known animtime + maxSpeed = maxSpeed + (maxSpeed /(2*animFramesPerKeyframe)); // add fudge + while(TRUE){ + animSpeed = (get CURRENT_SPEED); + if (animSpeed<1) animSpeed=1; + animSpeed = (maxSpeed * 4) / animSpeed; + //get PRINT(maxSpeed, animFramesPerKeyframe, animSpeed); //how to print debug info from bos + if (animSpeed<2) animSpeed=2; + if (animspeed>10) animSpeed = 10; + sleep 164; + } +} +StartMoving(){ + signal SIGNAL_MOVE; + isMoving=TRUE; + start-script UnitSpeed(); + start-script Walk(); +} +StopMoving(){ + signal SIGNAL_MOVE; + isMoving=FALSE; + call-script StopWalking(); } @@ -323,68 +177,39 @@ UnitSpeed(){ #define UNITSIZE 2 #define MAXTILT 100 -#include "unit_hitbyweaponid_and_smoke.h" +#include "../unit_hitbyweaponid_and_smoke.h" RockUnit(anglex, anglez) { - turn pelvis to x-axis anglex speed <50.000000>; - turn pelvis to z-axis <0> - anglez speed <50.000000>; + turn pelvis to x-axis anglex speed <50.0>; + turn pelvis to z-axis <0> - anglez speed <50.0>; wait-for-turn pelvis around z-axis; wait-for-turn pelvis around x-axis; - turn pelvis to z-axis <0.000000> speed <20.000000>; - turn pelvis to x-axis <0.000000> speed <20.000000>; + turn pelvis to z-axis <0.0> speed <20.0>; + turn pelvis to x-axis <0.0> speed <20.0>; } Create() { - hide lfire; - hide rfire; + animSpeed = 5; + hide flare; hide aimx1; hide aimy1; - bMoving = FALSE; - bAiming = 0; + isMoving = FALSE; + isAiming = 0; wpnheading = 0; animSpeed = 4; - gun_1 = 1; -} - -StartMoving() -{ - bMoving = TRUE; - signal SIG_WALK; - set-signal-mask SIG_WALK; - start-script Walk(); - start-script UnitSpeed(); -} - -StopMoving() -{ - signal SIG_WALK; - bMoving = FALSE; - call-script StopWalking(); -} - -SweetSpot(piecenum) -{ - piecenum = torso; } -AimFromPrimary(piecenum) +AimFromWeapon1(pieceIndex) { - piecenum = gun; + pieceIndex = aimx1; } -QueryPrimary(piecenum) +QueryWeapon1(pieceIndex) { - if( gun_1 == 0 ) - { - piecenum = rfire; - } - if( gun_1 == 1 ) - { - piecenum = lfire; - } + pieceIndex = flare; } static-var Stunned; @@ -393,12 +218,13 @@ ExecuteRestoreAfterDelay() if (Stunned) { return (1); } - turn aimy1 to y-axis <0.000000> speed <90>; - turn aimx1 to x-axis <0.000000> speed <45>; + turn aimy1 to y-axis <0.0> speed <90>; + turn aimx1 to x-axis <15.0> speed <45>; wpnheading = 0; - bAiming = 0; + isAiming = 0; } + SetStunned(State) { Stunned = State; @@ -406,147 +232,102 @@ SetStunned(State) start-script ExecuteRestoreAfterDelay(); } } + RestoreAfterDelay() { - set-signal-mask SIG_AIM; + set-signal-mask SIGNAL_AIM1; sleep 2750; start-script ExecuteRestoreAfterDelay(); } -AimPrimary(heading, pitch) +AimWeapon1(heading, pitch) { - //get PRINT ( heading,bAiming,wpnheading,RAND(1,256) ) ; - signal SIG_AIM; + //get PRINT ( heading,isAiming,wpnheading,RAND(1,256) ) ; + signal SIGNAL_AIM1; - if (bAiming == 1) return; + if (isAiming == 1) return; turn aimy1 to y-axis heading speed <200>; - turn aimx1 to x-axis <0.000000> - pitch speed <100>; + turn aimx1 to x-axis <0.0> - pitch speed <100>; //needed for luarules\gadgets\unit_continuous_aim.lua if ((get ABS(wpnheading - heading)) > 500){ - bAiming = 1; + isAiming = 1; wait-for-turn aimy1 around y-axis; wait-for-turn aimx1 around x-axis; - bAiming = 0; + isAiming = 0; } wpnheading = heading; start-script RestoreAfterDelay(); return (1); } - - -FirePrimary() +FireWeapon1() { return(1); } Shot1(zero) { - signal SIG_FIRE1; - set-signal-mask SIG_FIRE1; + signal SIGNAL_SHOOT1; + set-signal-mask SIGNAL_SHOOT1; + + emit-sfx 1024 + 0 from flare; + move lbarrel to z-axis [-5.0] now; + move lbarrel to z-axis [0.0] speed [15.0]; - if (gun_1 == 0) - { - emit-sfx 1024 + 0 from rfire; - } - else if (gun_1 == 1) - { - emit-sfx 1024 + 0 from lfire; - } - sleep 32; - ++gun_1; - if(gun_1>=2) - { - gun_1=0; - } return(1); } // For N:\animations\corthud_anim_death.blend Created by https://github.com/Beherith/Skeletor_S3O V((0, 2, 8)) //use call-script DeathAnim(); from Killed() DeathAnim() {// For N:\animations\corthud_anim_death.blend Created by https://github.com/Beherith/Skeletor_S3O V((0, 2, 8)) - signal SIG_WALK; - signal SIG_AIM; + signal SIGNAL_MOVE; + signal SIGNAL_AIM1; call-script StopWalking(); turn aimy1 to y-axis <0> speed <200>; turn aimx1 to x-axis <0> speed <200>; if (TRUE) { //Frame:10 - turn gun to x-axis <-33.089336> speed <99.268009> ; //delta=33.09 + turn sleeve to x-axis <-33.089336> speed <99.268009> ; //delta=33.09 turn lfoot to x-axis <-6.945373> speed <19.567049> ; //delta=6.52 - turn lfoot to y-axis <-0.865159> speed <2.093428> ; //delta=-0.70 turn lleg to x-axis <7.805739> speed <25.614638> ; //delta=-8.54 - turn lleg to z-axis <0.891584> speed <3.724061> ; //delta=1.24 - turn lleg to y-axis <0.587484> speed <1.140150> ; //delta=0.38 turn lthigh to x-axis <7.102166> speed <21.308018> ; //delta=-7.10 - turn lthigh to z-axis <1.461809> speed <6.126013> ; //delta=2.04 - turn lthigh to y-axis <14.416487> speed <3.600843> ; //delta=1.20 - move pelvis to z-axis [11.517023] speed [34.551069] ; //delta=11.52 + move pelvis to z-axis [-2.517023] speed [34.551069] ; //delta=11.52 move pelvis to y-axis [-2.697025] speed [8.091074] ; //delta=-2.70 turn pelvis to x-axis <43.435249> speed <130.305748> ; //delta=-43.44 turn rfoot to x-axis <-6.884301> speed <18.866100> ; //delta=6.29 - turn rfoot to y-axis <1.020098> speed <2.224660> ; //delta=0.74 turn rleg to x-axis <7.655927> speed <25.888408> ; //delta=-8.63 - turn rleg to z-axis <-0.901071> speed <4.770375> ; //delta=-1.59 - turn rleg to y-axis <-0.879568> speed <2.000630> ; //delta=-0.67 turn rthigh to x-axis <7.473859> speed <22.955275> ; //delta=-7.65 - turn rthigh to z-axis <-1.678257> speed <7.212598> ; //delta=-2.40 - turn rthigh to y-axis <-16.617184> speed <4.642435> ; //delta=-1.55 sleep 329; } if (TRUE) { //Frame:15 - turn gun to x-axis <-54.244058> speed <126.928329> ; //delta=21.15 + turn sleeve to x-axis <-54.244058> speed <126.928329> ; //delta=21.15 turn lfoot to x-axis <2.989375> speed <59.608484> ; //delta=-9.93 - turn lfoot to y-axis <0.199284> speed <6.386655> ; //delta=1.06 turn lleg to x-axis <11.746052> speed <23.641878> ; //delta=-3.94 - turn lleg to z-axis <-1.691726> speed <15.499856> ; //delta=2.58 turn lthigh to x-axis <26.946715> speed <119.067297> ; //delta=-19.84 - turn lthigh to z-axis <-3.826971> speed <31.732684> ; //delta=5.29 - turn lthigh to y-axis <18.672511> speed <25.536144> ; //delta=4.26 - move pelvis to z-axis [15.817684] speed [25.803967] ; //delta=4.30 + move pelvis to z-axis [-4.817684] speed [25.803967] ; //delta=4.30 move pelvis to y-axis [-6.851900] speed [24.929253] ; //delta=-4.15 turn pelvis to x-axis <48.586663> speed <30.908484> ; //delta=-5.15 turn rfoot to x-axis <3.556655> speed <62.645738> ; //delta=-10.44 - turn rfoot to y-axis <-0.213011> speed <7.398653> ; //delta=-1.23 - explode gun type FALL|SMOKE|FIRE|NOHEATCLOUD; - explode rfire type FALL|SMOKE|FIRE|NOHEATCLOUD; - hide rfire; + explode lbarrel type FALL|SMOKE|FIRE|NOHEATCLOUD; turn rleg to x-axis <11.227784> speed <21.431141> ; //delta=-3.57 - turn rleg to z-axis <1.919777> speed <16.925090> ; //delta=-2.82 - turn rleg to y-axis <-1.045468> speed <0.995405> ; //delta=-0.17 turn rthigh to x-axis <27.273505> speed <118.797882> ; //delta=-19.80 - turn rthigh to z-axis <4.724743> speed <38.417999> ; //delta=-6.40 - turn rthigh to y-axis <-21.928973> speed <31.870732> ; //delta=-5.31 sleep 164; } if (TRUE) { //Frame:20 - turn gun to x-axis <-62.399836> speed <48.934672> ; //delta=8.16 - turn lfoot to x-axis <11.522802> speed <51.200566> ; //delta=-8.53 + turn sleeve to x-axis <-62.399836> speed <48.934672> ; //delta=8.16 turn lfoot to z-axis <-6.209884> speed <0.704138> ; //delta=0.12 - turn lfoot to y-axis <1.123340> speed <5.544340> ; //delta=0.92 - explode gun type FALL|SMOKE|FIRE|NOHEATCLOUD; - explode lfire type FALL|SMOKE|FIRE|NOHEATCLOUD; - hide lfire; + explode lbarrel type FALL|SMOKE|FIRE|NOHEATCLOUD; + hide flare; turn lleg to x-axis <-1.742445> speed <80.930980> ; //delta=13.49 - turn lleg to z-axis <0.933257> speed <15.749897> ; //delta=-2.62 - turn lleg to y-axis <0.008897> speed <3.910881> ; //delta=-0.65 turn lthigh to x-axis <11.550897> speed <92.374911> ; //delta=15.40 - turn lthigh to z-axis <1.768076> speed <33.570283> ; //delta=-5.60 - turn lthigh to y-axis <14.539997> speed <24.795082> ; //delta=-4.13 - move pelvis to z-axis [18.514709] speed [16.182152] ; //delta=2.70 + move pelvis to z-axis [-6.514709] speed [16.182152] ; //delta=2.70 move pelvis to y-axis [-9.767603] speed [17.494217] ; //delta=-2.92 turn pelvis to x-axis <83.165073> speed <207.470459> ; //delta=-34.58 turn rfoot to x-axis <12.450249> speed <53.361562> ; //delta=-8.89 - turn rfoot to z-axis <6.862478> speed <0.895284> ; //delta=-0.15 - turn rfoot to y-axis <-1.278525> speed <6.393086> ; //delta=-1.07 turn rleg to x-axis <-2.288166> speed <81.095700> ; //delta=13.52 - turn rleg to z-axis <-1.234413> speed <18.925144> ; //delta=3.15 - turn rleg to y-axis <0.052477> speed <6.587672> ; //delta=1.10 turn rthigh to x-axis <12.131311> speed <90.853168> ; //delta=15.14 - turn rthigh to z-axis <-1.838792> speed <39.381207> ; //delta=6.56 - turn rthigh to y-axis <-16.901091> speed <30.167289> ; //delta=5.03 sleep 164; } } @@ -554,8 +335,7 @@ DeathAnim() {// For N:\animations\corthud_anim_death.blend Created by https://gi Killed(severity, corpsetype) { - hide rfire; - hide lfire; + hide flare; if( severity <= 25 ) { call-script DeathAnim(); @@ -565,10 +345,7 @@ Killed(severity, corpsetype) explode lleg type BITMAPONLY | NOHEATCLOUD; explode lfoot type BITMAPONLY | NOHEATCLOUD; explode torso type BITMAPONLY | NOHEATCLOUD; - explode gun type BITMAPONLY | NOHEATCLOUD; - //explode rthigh type BITMAPONLY | NOHEATCLOUD; - //explode rleg type BITMAPONLY | NOHEATCLOUD; - //explode rfoot type BITMAPONLY | NOHEATCLOUD; + explode sleeve type BITMAPONLY | NOHEATCLOUD; return(corpsetype); } if( severity <= 50 ) @@ -579,10 +356,7 @@ Killed(severity, corpsetype) explode lleg type FIRE | SMOKE | FALL | NOHEATCLOUD; explode lfoot type FIRE | SMOKE | FALL | NOHEATCLOUD; explode torso type FALL | NOHEATCLOUD; - explode gun type FIRE | SMOKE | FALL | NOHEATCLOUD; - //explode rthigh type FIRE | SMOKE | FALL | NOHEATCLOUD; - //explode rleg type FIRE | SMOKE | FALL | NOHEATCLOUD; - //explode rfoot type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode sleeve type FIRE | SMOKE | FALL | NOHEATCLOUD; return(corpsetype); } if( severity <= 99 ) @@ -593,10 +367,7 @@ Killed(severity, corpsetype) explode lleg type SMOKE | FALL | NOHEATCLOUD; explode lfoot type FIRE | SMOKE | FALL | NOHEATCLOUD; explode torso type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode gun type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; - //explode rthigh type FIRE | SMOKE | FALL | NOHEATCLOUD; - //explode rleg type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; - //explode rfoot type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD; + explode sleeve type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; return(corpsetype); } corpsetype = 3 ; @@ -605,9 +376,6 @@ Killed(severity, corpsetype) explode lleg type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; explode lfoot type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; explode torso type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - explode gun type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - //explode rthigh type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - //explode rleg type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - //explode rfoot type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode sleeve type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; return corpsetype; } diff --git a/scripts/Units/leggob.cob b/scripts/Units/leggob.cob index 9b67dc8d98a..10b8ae4a06f 100644 Binary files a/scripts/Units/leggob.cob and b/scripts/Units/leggob.cob differ diff --git a/scripts/Units/leggob_clean.bos b/scripts/Units/leggob_clean.bos deleted file mode 100644 index adf4ac59e75..00000000000 --- a/scripts/Units/leggob_clean.bos +++ /dev/null @@ -1,596 +0,0 @@ - -#include "../recoil_common_includes.h" - -piece torso, torso2, lfire, rfire, gun, pelvis, rleg, - rfoot, lleg, lfoot, lthigh, rthigh, aimx1, aimy1; - -static-var isMoving, isAiming, gun_1, wpnheading, animSpeed, maxSpeed, animFramesPerKeyframe, StompXZ, StompHeading; - -lua_UnitScriptDecal(lightIndex, xpos,zpos, heading) -{ - return 0; -} - -// Signal definitions -#define SIGNAL_AIM1 256 -#define SIGNAL_MOVE 1 -#define SIGNAL_SHOOT1 16 -Walk() {//Created by https://github.com/Beherith/Skeletor_S3O from N:\animations\corthud_anim_walk.blend - set-signal-mask SIGNAL_MOVE; - if (isMoving) { //Frame:4 - turn gun to x-axis <-6.599999> speed <197.999970> / animSpeed; - turn lfoot to x-axis <-19.636401> speed <576.401349> / animSpeed; - turn lfoot to z-axis <-11.014305> speed <147.893476> / animSpeed; - turn lfoot to y-axis <1.522653> speed <50.700078> / animSpeed; - turn lleg to x-axis <-22.882737> speed <686.482113> / animSpeed; - turn lleg to z-axis <3.302126> speed <99.063781> / animSpeed; - turn lleg to y-axis <2.594710> speed <77.841290> / animSpeed; - turn lthigh to x-axis <40.929673> speed <1227.890189> / animSpeed; - turn lthigh to z-axis <13.142189> speed <394.265669> / animSpeed; - turn lthigh to y-axis <-6.410377> speed <627.692575> / animSpeed; - turn rfoot to x-axis <20.280490> speed <626.282720> / animSpeed; - turn rfoot to z-axis <-1.502973> speed <246.114015> / animSpeed; - turn rfoot to y-axis <0.474751> speed <5.886180> / animSpeed; - turn rleg to x-axis <11.111350> speed <333.340501> / animSpeed; - turn rleg to z-axis <-1.482851> speed <44.485515> / animSpeed; - turn rleg to y-axis <-0.901252> speed <27.037563> / animSpeed; - turn rthigh to x-axis <-41.279464> speed <1238.383921> / animSpeed; - turn rthigh to z-axis <0.106346> speed <3.190367> / animSpeed; - turn rthigh to y-axis <3.073403> speed <590.945515> / animSpeed; - turn torso to x-axis <-3.343591> speed <103.692254> / animSpeed; - turn torso to z-axis <-0.423710> speed <12.711288> / animSpeed; - turn torso to y-axis <-6.065435> speed <181.963053> / animSpeed; - sleep 131; - } - while(isMoving) { - if (isMoving) { //Frame:8 - turn gun to x-axis <-10.600000> speed <120.0> / animSpeed; - turn lfoot to x-axis <7.944267> speed <827.420053> / animSpeed; - turn lfoot to z-axis <-9.756190> speed <37.743446> / animSpeed; - turn lfoot to y-axis <-7.350180> speed <266.184994> / animSpeed; - turn lleg to x-axis <-6.173776> speed <501.268847> / animSpeed; - turn lleg to z-axis <-2.468694> speed <173.124613> / animSpeed; - turn lleg to y-axis <-1.233904> speed <114.858423> / animSpeed; - turn lthigh to x-axis <49.833368> speed <267.110837> / animSpeed; - turn lthigh to z-axis <3.108793> speed <301.001890> / animSpeed; - turn lthigh to y-axis <-1.909480> speed <135.026891> / animSpeed; - move pelvis to y-axis [-0.950000] speed [28.500000] / animSpeed; - turn pelvis to x-axis <4.014409> speed <120.432273> / animSpeed; - turn pelvis to y-axis <9.190592> speed <275.717772> / animSpeed; - turn rfoot to x-axis <39.151758> speed <566.138039> / animSpeed; - turn rfoot to z-axis <15.473206> speed <509.285362> / animSpeed; - turn rfoot to y-axis <-20.348790> speed <624.706219> / animSpeed; - turn rleg to x-axis <-34.993282> speed <1383.138971> / animSpeed; - turn rleg to z-axis <1.770067> speed <97.587532> / animSpeed; - turn rleg to y-axis <9.414717> speed <309.479059> / animSpeed; - turn rthigh to x-axis <-31.744390> speed <286.052216> / animSpeed; - turn rthigh to z-axis <3.626211> speed <105.595977> / animSpeed; - turn rthigh to y-axis <5.327848> speed <67.633363> / animSpeed; - turn torso to x-axis <0.112818> speed <103.692252> / animSpeed; - turn torso to z-axis <-0.847419> speed <12.711288> / animSpeed; - turn torso to y-axis <-12.130870> speed <181.963053> / animSpeed; - sleep ((33*animSpeed) -1); - } - if (isMoving) { //Frame:12 - turn gun to x-axis <-0.0> speed <317.999982> / animSpeed; - turn lfoot to x-axis <-20.910981> speed <865.657450> / animSpeed; - turn lfoot to z-axis <-3.878097> speed <176.342797> / animSpeed; - turn lfoot to y-axis <-15.547735> speed <245.926664> / animSpeed; - turn lleg to x-axis <32.817485> speed <1169.737805> / animSpeed; - turn lleg to z-axis <3.044538> speed <165.396973> / animSpeed; - turn lleg to y-axis <-4.104570> speed <86.119960> / animSpeed; - turn lthigh to x-axis <10.185038> speed <1189.449884> / animSpeed; - turn lthigh to z-axis <-2.941290> speed <181.502469> / animSpeed; - turn lthigh to y-axis <0.737880> speed <79.420814> / animSpeed; - move pelvis to z-axis [0.556818] speed [16.704531] / animSpeed; - move pelvis to y-axis [-1.381859] speed [12.955783] / animSpeed; - turn pelvis to x-axis <8.125114> speed <123.321136> / animSpeed; - turn pelvis to y-axis <6.746421> speed <73.325137> / animSpeed; - turn rfoot to x-axis <20.469391> speed <560.471014> / animSpeed; - turn rfoot to z-axis <9.908131> speed <166.952252> / animSpeed; - turn rfoot to y-axis <-3.628238> speed <501.616559> / animSpeed; - turn rleg to x-axis <11.338249> speed <1389.945938> / animSpeed; - turn rleg to z-axis <-0.939371> speed <81.283152> / animSpeed; - turn rleg to y-axis <-1.633650> speed <331.450992> / animSpeed; - turn rthigh to x-axis <-38.191341> speed <193.408520> / animSpeed; - turn rthigh to z-axis <-1.591400> speed <156.528351> / animSpeed; - turn rthigh to y-axis <4.223383> speed <33.133952> / animSpeed; - turn torso to z-axis <-0.590221> speed <7.715946> / animSpeed; - turn torso to y-axis <-8.445438> speed <110.562953> / animSpeed; - sleep ((33*animSpeed) -1); - } - if (isMoving) { //Frame:16 - turn gun to x-axis <-2.900001> speed <86.999991> / animSpeed; - turn lfoot to x-axis <-13.641220> speed <218.092841> / animSpeed; - turn lfoot to z-axis <0.698070> speed <137.285005> / animSpeed; - turn lfoot to y-axis <-9.595372> speed <178.570916> / animSpeed; - turn lleg to x-axis <37.087907> speed <128.112663> / animSpeed; - turn lleg to z-axis <1.981463> speed <31.892243> / animSpeed; - turn lleg to y-axis <-1.709907> speed <71.839888> / animSpeed; - turn lthigh to x-axis <-28.749806> speed <1168.045335> / animSpeed; - turn lthigh to z-axis <-5.231971> speed <68.720439> / animSpeed; - turn lthigh to y-axis <-0.812102> speed <46.499450> / animSpeed; - move pelvis to z-axis [0.202479] speed [10.630156] / animSpeed; - move pelvis to y-axis [-0.622563] speed [22.778907] / animSpeed; - turn pelvis to x-axis <3.814975> speed <129.304151> / animSpeed; - turn pelvis to y-axis <2.885238> speed <115.835496> / animSpeed; - turn rfoot to x-axis <-5.308605> speed <773.339874> / animSpeed; - turn rfoot to z-axis <11.849091> speed <58.228788> / animSpeed; - turn rfoot to y-axis <-8.066427> speed <133.145671> / animSpeed; - turn rleg to x-axis <9.306979> speed <60.938103> / animSpeed; - turn rleg to z-axis <-3.463636> speed <75.727954> / animSpeed; - turn rleg to y-axis <-2.342969> speed <21.279586> / animSpeed; - turn rthigh to x-axis <-8.053329> speed <904.140349> / animSpeed; - turn rthigh to z-axis <-7.745611> speed <184.626330> / animSpeed; - turn rthigh to y-axis <3.236615> speed <29.603037> / animSpeed; - turn torso to z-axis <-0.024385> speed <16.975080> / animSpeed; - turn torso to y-axis <-0.337490> speed <243.238443> / animSpeed; - sleep ((33*animSpeed) -1); - } - if (isMoving) { //Frame:20 - turn gun to x-axis <-6.599999> speed <110.999953> / animSpeed; - turn lfoot to x-axis <20.034712> speed <1010.277954> / animSpeed; - turn lfoot to z-axis <1.499531> speed <24.043838> / animSpeed; - turn lfoot to y-axis <-0.466431> speed <273.868209> / animSpeed; - turn lleg to x-axis <11.560504> speed <765.822077> / animSpeed; - turn lleg to z-axis <2.249283> speed <8.034582> / animSpeed; - turn lleg to y-axis <0.745859> speed <73.672989> / animSpeed; - turn lthigh to x-axis <-41.089865> speed <370.201751> / animSpeed; - turn lthigh to z-axis <0.235525> speed <164.024892> / animSpeed; - turn lthigh to y-axis <-1.978531> speed <34.992890> / animSpeed; - move pelvis to z-axis [0.0] speed [6.074375] / animSpeed; - move pelvis to y-axis [0.0] speed [18.676876] / animSpeed; - turn pelvis to x-axis <-0.0> speed <114.449258> / animSpeed; - turn pelvis to y-axis <-0.0> speed <86.557139> / animSpeed; - turn rfoot to x-axis <-20.376049> speed <452.023315> / animSpeed; - turn rfoot to z-axis <11.064463> speed <23.538821> / animSpeed; - turn rfoot to y-axis <-1.372614> speed <200.814375> / animSpeed; - turn rleg to x-axis <-22.931081> speed <967.141801> / animSpeed; - turn rleg to z-axis <-4.680035> speed <36.491959> / animSpeed; - turn rleg to y-axis <-2.537048> speed <5.822356> / animSpeed; - turn rthigh to x-axis <41.440390> speed <1484.811579> / animSpeed; - turn rthigh to z-axis <-12.350508> speed <138.146894> / animSpeed; - turn rthigh to y-axis <4.809287> speed <47.180153> / animSpeed; - turn torso to z-axis <0.541451> speed <16.975075> / animSpeed; - turn torso to y-axis <7.770459> speed <243.238468> / animSpeed; - sleep ((33*animSpeed) -1); - } - if (isMoving) { //Frame:24 - turn gun to x-axis <-10.600000> speed <120.0> / animSpeed; - turn lfoot to x-axis <39.860813> speed <594.783033> / animSpeed; - turn lfoot to z-axis <-15.635314> speed <514.045353> / animSpeed; - turn lfoot to y-axis <20.602533> speed <632.068933> / animSpeed; - turn lleg to x-axis <-35.596566> speed <1414.712093> / animSpeed; - turn lleg to z-axis <-1.072036> speed <99.639572> / animSpeed; - turn lleg to y-axis <-7.678853> speed <252.741374> / animSpeed; - turn lthigh to x-axis <-31.795794> speed <278.822119> / animSpeed; - turn lthigh to z-axis <-2.060410> speed <68.878075> / animSpeed; - turn lthigh to y-axis <-4.882766> speed <87.127046> / animSpeed; - move pelvis to y-axis [-0.950000] speed [28.500000] / animSpeed; - turn pelvis to x-axis <4.014409> speed <120.432273> / animSpeed; - turn pelvis to y-axis <-8.099956> speed <242.998690> / animSpeed; - turn rfoot to x-axis <8.569539> speed <868.367635> / animSpeed; - turn rfoot to z-axis <9.771561> speed <38.787082> / animSpeed; - turn rfoot to y-axis <7.240249> speed <258.385903> / animSpeed; - turn rleg to x-axis <-6.475375> speed <493.671188> / animSpeed; - turn rleg to z-axis <1.604088> speed <188.523690> / animSpeed; - turn rleg to y-axis <1.016681> speed <106.611859> / animSpeed; - turn rthigh to x-axis <50.993031> speed <286.579233> / animSpeed; - turn rthigh to z-axis <-2.608810> speed <292.250926> / animSpeed; - turn rthigh to y-axis <0.580910> speed <126.851300> / animSpeed; - turn torso to z-axis <0.798649> speed <7.715941> / animSpeed; - turn torso to y-axis <11.455892> speed <110.563004> / animSpeed; - sleep ((33*animSpeed) -1); - } - if (isMoving) { //Frame:28 - turn gun to x-axis <-0.0> speed <317.999982> / animSpeed; - turn lfoot to x-axis <21.389480> speed <554.139992> / animSpeed; - turn lfoot to z-axis <-9.970639> speed <169.940238> / animSpeed; - turn lfoot to y-axis <3.801959> speed <504.017234> / animSpeed; - turn lleg to x-axis <10.244273> speed <1375.225156> / animSpeed; - turn lleg to z-axis <2.313724> speed <101.572812> / animSpeed; - turn lleg to y-axis <1.448232> speed <273.812543> / animSpeed; - turn lthigh to x-axis <-38.336807> speed <196.230379> / animSpeed; - turn lthigh to z-axis <2.786143> speed <145.396617> / animSpeed; - turn lthigh to y-axis <-2.949849> speed <57.987512> / animSpeed; - move pelvis to z-axis [0.556818] speed [16.704531] / animSpeed; - move pelvis to y-axis [-1.381859] speed [12.955783] / animSpeed; - turn pelvis to x-axis <8.125114> speed <123.321136> / animSpeed; - turn pelvis to y-axis <-4.770867> speed <99.872691> / animSpeed; - turn rfoot to x-axis <-20.596466> speed <874.980146> / animSpeed; - turn rfoot to z-axis <3.870100> speed <177.043818> / animSpeed; - turn rfoot to y-axis <12.899483> speed <169.777030> / animSpeed; - turn rleg to x-axis <33.873323> speed <1210.460925> / animSpeed; - turn rleg to z-axis <-1.946575> speed <106.519901> / animSpeed; - turn rleg to y-axis <1.629631> speed <18.388495> / animSpeed; - turn rthigh to x-axis <12.704178> speed <1148.665587> / animSpeed; - turn rthigh to z-axis <1.492647> speed <123.043719> / animSpeed; - turn rthigh to y-axis <-0.753182> speed <40.022774> / animSpeed; - turn torso to z-axis <0.541451> speed <7.715947> / animSpeed; - turn torso to y-axis <7.770460> speed <110.562953> / animSpeed; - sleep ((33*animSpeed) -1); - } - if (isMoving) { //Frame:32 - turn gun to x-axis <-2.900001> speed <86.999991> / animSpeed; - turn lfoot to x-axis <-4.635911> speed <780.761724> / animSpeed; - turn lfoot to z-axis <-11.836854> speed <55.986429> / animSpeed; - turn lfoot to y-axis <8.208373> speed <132.192425> / animSpeed; - turn lleg to x-axis <8.596608> speed <49.429959> / animSpeed; - turn lleg to z-axis <3.944391> speed <48.920013> / animSpeed; - turn lleg to y-axis <1.930907> speed <14.480252> / animSpeed; - turn lthigh to x-axis <-8.388484> speed <898.449683> / animSpeed; - turn lthigh to z-axis <7.778458> speed <149.769451> / animSpeed; - turn lthigh to y-axis <-3.052946> speed <3.092917> / animSpeed; - move pelvis to z-axis [0.202479] speed [10.630156] / animSpeed; - move pelvis to y-axis [-0.622563] speed [22.778907] / animSpeed; - turn pelvis to x-axis <3.814975> speed <129.304151> / animSpeed; - turn pelvis to y-axis <-1.703881> speed <92.009570> / animSpeed; - turn rfoot to x-axis <-13.882681> speed <201.413545> / animSpeed; - turn rfoot to z-axis <-0.700750> speed <137.125513> / animSpeed; - turn rfoot to y-axis <4.341740> speed <256.732314> / animSpeed; - turn rleg to x-axis <38.347544> speed <134.226639> / animSpeed; - turn rleg to z-axis <1.177458> speed <93.721003> / animSpeed; - turn rleg to y-axis <-2.240978> speed <116.118250> / animSpeed; - turn rthigh to x-axis <-27.842240> speed <1216.392547> / animSpeed; - turn rthigh to z-axis <3.461246> speed <59.057959> / animSpeed; - turn rthigh to y-axis <2.335601> speed <92.663495> / animSpeed; - turn torso to z-axis <-0.024385> speed <16.975078> / animSpeed; - turn torso to y-axis <-0.337488> speed <243.238455> / animSpeed; - sleep ((33*animSpeed) -1); - } - if (isMoving) { //Frame:36 - turn gun to x-axis <-6.599999> speed <110.999953> / animSpeed; - turn lfoot to x-axis <-19.636401> speed <450.014715> / animSpeed; - turn lfoot to z-axis <-11.014305> speed <24.676457> / animSpeed; - turn lfoot to y-axis <1.522653> speed <200.571590> / animSpeed; - turn lleg to x-axis <-22.882737> speed <944.380340> / animSpeed; - turn lleg to z-axis <3.302126> speed <19.267953> / animSpeed; - turn lleg to y-axis <2.594710> speed <19.914085> / animSpeed; - turn lthigh to x-axis <40.929673> speed <1479.544709> / animSpeed; - turn lthigh to z-axis <13.142189> speed <160.911914> / animSpeed; - turn lthigh to y-axis <-6.410377> speed <100.722915> / animSpeed; - move pelvis to z-axis [0.0] speed [6.074375] / animSpeed; - move pelvis to y-axis [0.0] speed [18.676876] / animSpeed; - turn pelvis to x-axis <-0.0> speed <114.449258> / animSpeed; - turn pelvis to y-axis <-0.0> speed <51.116429> / animSpeed; - turn rfoot to x-axis <20.280490> speed <1024.895131> / animSpeed; - turn rfoot to z-axis <-1.502973> speed <24.066665> / animSpeed; - turn rfoot to y-axis <0.474751> speed <116.009663> / animSpeed; - turn rleg to x-axis <11.111350> speed <817.085814> / animSpeed; - turn rleg to z-axis <-1.482851> speed <79.809259> / animSpeed; - turn rleg to y-axis <-0.901252> speed <40.191771> / animSpeed; - turn rthigh to x-axis <-41.279464> speed <403.116723> / animSpeed; - turn rthigh to z-axis <0.106346> speed <100.647005> / animSpeed; - turn rthigh to y-axis <3.073403> speed <22.134052> / animSpeed; - turn torso to x-axis <-3.343591> speed <103.201652> / animSpeed; - turn torso to z-axis <-0.423710> speed <11.979729> / animSpeed; - turn torso to y-axis <-6.065435> speed <171.838407> / animSpeed; - sleep ((33*animSpeed) -1); - } - } -} -// Call this from StopMoving()! -StopWalking() { - move pelvis to y-axis [0.0] speed [7.125000]; - move pelvis to z-axis [0.0] speed [4.176133]; - turn gun to x-axis <0.0> speed <79.499995>; - turn lfoot to x-axis <-0.423023> speed <252.569489>; - turn lfoot to y-axis <-0.167349> speed <158.017233>; - turn lfoot to z-axis <-6.084522> speed <128.511338>; - turn lleg to x-axis <0.0> speed <353.678023>; - turn lleg to y-axis <0.0> speed <68.453136>; - turn lleg to z-axis <0.0> speed <43.281153>; - turn lthigh to x-axis <0.0> speed <369.886177>; - turn lthigh to y-axis <14.512709> speed <156.923144>; - turn lthigh to z-axis <0.0> speed <98.566417>; - turn pelvis to x-axis <0.0> speed <32.326038>; - turn pelvis to y-axis <0.0> speed <68.929443>; - turn rfoot to x-axis <-0.595601> speed <256.223783>; - turn rfoot to y-axis <0.278545> speed <156.176555>; - turn rfoot to z-axis <6.700828> speed <127.321340>; - turn rleg to x-axis <0.0> speed <347.486484>; - turn rleg to y-axis <0.0> speed <82.862748>; - turn rleg to z-axis <0.0> speed <47.130923>; - turn rthigh to x-axis <0.0> speed <371.202895>; - turn rthigh to y-axis <-16.624781> speed <147.736379>; - turn rthigh to z-axis <0.0> speed <73.062732>; - turn torso to x-axis <-6.799999> speed <25.923064>; - turn torso to y-axis <0.0> speed <60.809617>; - turn torso to z-axis <0.0> speed <4.243770>; -} - -UnitSpeed(){ - maxSpeed = get MAX_SPEED; // this returns cob units per frame i think - animFramesPerKeyframe = 4; //we need to calc the frames per keyframe value, from the known animtime - maxSpeed = maxSpeed + (maxSpeed /(2*animFramesPerKeyframe)); // add fudge - while(TRUE){ - animSpeed = (get CURRENT_SPEED); - if (animSpeed<1) animSpeed=1; - animSpeed = (maxSpeed * 3) / animSpeed; - //get PRINT(maxSpeed, animFramesPerKeyframe, animSpeed); - if (animSpeed<2) animSpeed=2; - if (animspeed>8) animSpeed = 8; - sleep 131; - } -} - - -#define BASEPIECE pelvis -#define HITSPEED <55.0> -//how 'heavy' the unit is, on a scale of 1-10 -#define UNITSIZE 2 -#define MAXTILT 100 - -#include "../unit_hitbyweaponid_and_smoke.h" - -RockUnit(anglex, anglez) -{ - turn pelvis to x-axis anglex speed <50.0>; - turn pelvis to z-axis <0> - anglez speed <50.0>; - wait-for-turn pelvis around z-axis; - wait-for-turn pelvis around x-axis; - turn pelvis to z-axis <0.0> speed <20.0>; - turn pelvis to x-axis <0.0> speed <20.0>; -} - - -Create() -{ - hide lfire; - hide rfire; - hide aimx1; - hide aimy1; - isMoving = FALSE; - isAiming = 0; - wpnheading = 0; - animSpeed = 4; - gun_1 = 1; -} - -StartMoving(reversing) -{ - isMoving = TRUE; - signal SIGNAL_MOVE; - set-signal-mask SIGNAL_MOVE; - start-script Walk(); - start-script UnitSpeed(); -} - -StopMoving() -{ - signal SIGNAL_MOVE; - isMoving = FALSE; - call-script StopWalking(); -} - - - -AimFromWeapon1(pieceIndex) -{ - pieceIndex = gun; -} - -QueryWeapon1(pieceIndex) -{ - if( gun_1 == 0 ) - { - pieceIndex = rfire; - } - if( gun_1 == 1 ) - { - pieceIndex = lfire; - } -} - -static-var Stunned; -ExecuteRestoreAfterDelay() -{ - if (Stunned) { - return (1); - } - turn aimy1 to y-axis <0.0> speed <90>; - turn aimx1 to x-axis <0.0> speed <45>; - wpnheading = 0; - isAiming = 0; - -} -SetStunned(State) -{ - Stunned = State; - if (!Stunned) { - start-script ExecuteRestoreAfterDelay(); - } -} -RestoreAfterDelay() -{ - - set-signal-mask SIGNAL_AIM1; - sleep 2750; - start-script ExecuteRestoreAfterDelay(); -} - - -AimWeapon1(heading, pitch) -{ - //get PRINT ( heading,isAiming,wpnheading,RAND(1,256) ) ; - signal SIGNAL_AIM1; - - if (isAiming == 1) return; - turn aimy1 to y-axis heading speed <200>; - turn aimx1 to x-axis <0.0> - pitch speed <100>; - - //needed for luarules\gadgets\unit_continuous_aim.lua - if ((get ABS(wpnheading - heading)) > 500){ - isAiming = 1; - wait-for-turn aimy1 around y-axis; - wait-for-turn aimx1 around x-axis; - isAiming = 0; - } - wpnheading = heading; - start-script RestoreAfterDelay(); - return (1); -} - - - -FireWeapon1() -{ - return(1); -} - -Shot1(zero) -{ - signal SIGNAL_SHOOT1; - set-signal-mask SIGNAL_SHOOT1; - - if (gun_1 == 0) - { - emit-sfx 1024 + 0 from rfire; - } - else if (gun_1 == 1) - { - emit-sfx 1024 + 0 from lfire; - } - sleep 32; - ++gun_1; - if(gun_1>=2) - { - gun_1=0; - } - return(1); -} - -// For N:\animations\corthud_anim_death.blend Created by https://github.com/Beherith/Skeletor_S3O V((0, 2, 8)) -//use call-script DeathAnim(); from Killed() -DeathAnim() {// For N:\animations\corthud_anim_death.blend Created by https://github.com/Beherith/Skeletor_S3O V((0, 2, 8)) - signal SIGNAL_MOVE; - signal SIGNAL_AIM1; - call-script StopWalking(); - turn aimy1 to y-axis <0> speed <200>; - turn aimx1 to x-axis <0> speed <200>; - if (TRUE) { //Frame:10 - turn gun to x-axis <-33.089336> speed <99.268009> ; //delta=33.09 - turn lfoot to x-axis <-6.945373> speed <19.567049> ; //delta=6.52 - turn lfoot to y-axis <-0.865159> speed <2.093428> ; //delta=-0.70 - turn lleg to x-axis <7.805739> speed <25.614638> ; //delta=-8.54 - turn lleg to z-axis <0.891584> speed <3.724061> ; //delta=1.24 - turn lleg to y-axis <0.587484> speed <1.140150> ; //delta=0.38 - turn lthigh to x-axis <7.102166> speed <21.308018> ; //delta=-7.10 - turn lthigh to z-axis <1.461809> speed <6.126013> ; //delta=2.04 - turn lthigh to y-axis <14.416487> speed <3.600843> ; //delta=1.20 - move pelvis to z-axis [11.517023] speed [34.551069] ; //delta=11.52 - move pelvis to y-axis [-2.697025] speed [8.091074] ; //delta=-2.70 - turn pelvis to x-axis <43.435249> speed <130.305748> ; //delta=-43.44 - turn rfoot to x-axis <-6.884301> speed <18.866100> ; //delta=6.29 - turn rfoot to y-axis <1.020098> speed <2.224660> ; //delta=0.74 - turn rleg to x-axis <7.655927> speed <25.888408> ; //delta=-8.63 - turn rleg to z-axis <-0.901071> speed <4.770375> ; //delta=-1.59 - turn rleg to y-axis <-0.879568> speed <2.0> ; //delta=-0.67 - turn rthigh to x-axis <7.473859> speed <22.955275> ; //delta=-7.65 - turn rthigh to z-axis <-1.678257> speed <7.212598> ; //delta=-2.40 - turn rthigh to y-axis <-16.617184> speed <4.642435> ; //delta=-1.55 - sleep 329; - } - if (TRUE) { //Frame:15 - turn gun to x-axis <-54.244058> speed <126.928329> ; //delta=21.15 - turn lfoot to x-axis <2.989375> speed <59.608484> ; //delta=-9.93 - turn lfoot to y-axis <0.199284> speed <6.386655> ; //delta=1.06 - turn lleg to x-axis <11.746052> speed <23.641878> ; //delta=-3.94 - turn lleg to z-axis <-1.691726> speed <15.499856> ; //delta=2.58 - turn lthigh to x-axis <26.946715> speed <119.067297> ; //delta=-19.84 - turn lthigh to z-axis <-3.826971> speed <31.732684> ; //delta=5.29 - turn lthigh to y-axis <18.672511> speed <25.536144> ; //delta=4.26 - move pelvis to z-axis [15.817684] speed [25.803967] ; //delta=4.30 - move pelvis to y-axis [-6.851900] speed [24.929253] ; //delta=-4.15 - turn pelvis to x-axis <48.586663> speed <30.908484> ; //delta=-5.15 - turn rfoot to x-axis <3.556655> speed <62.645738> ; //delta=-10.44 - turn rfoot to y-axis <-0.213011> speed <7.398653> ; //delta=-1.23 - explode gun type FALL|SMOKE|FIRE|NOHEATCLOUD; - explode rfire type FALL|SMOKE|FIRE|NOHEATCLOUD; - hide rfire; - turn rleg to x-axis <11.227784> speed <21.431141> ; //delta=-3.57 - turn rleg to z-axis <1.919777> speed <16.925090> ; //delta=-2.82 - turn rleg to y-axis <-1.045468> speed <0.995405> ; //delta=-0.17 - turn rthigh to x-axis <27.273505> speed <118.797882> ; //delta=-19.80 - turn rthigh to z-axis <4.724743> speed <38.417999> ; //delta=-6.40 - turn rthigh to y-axis <-21.928973> speed <31.870732> ; //delta=-5.31 - sleep 164; - } - if (TRUE) { //Frame:20 - turn gun to x-axis <-62.399836> speed <48.934672> ; //delta=8.16 - turn lfoot to x-axis <11.522802> speed <51.200566> ; //delta=-8.53 - turn lfoot to z-axis <-6.209884> speed <0.704138> ; //delta=0.12 - turn lfoot to y-axis <1.123340> speed <5.544340> ; //delta=0.92 - explode gun type FALL|SMOKE|FIRE|NOHEATCLOUD; - explode lfire type FALL|SMOKE|FIRE|NOHEATCLOUD; - hide lfire; - turn lleg to x-axis <-1.742445> speed <80.930980> ; //delta=13.49 - turn lleg to z-axis <0.933257> speed <15.749897> ; //delta=-2.62 - turn lleg to y-axis <0.008897> speed <3.910881> ; //delta=-0.65 - turn lthigh to x-axis <11.550897> speed <92.374911> ; //delta=15.40 - turn lthigh to z-axis <1.768076> speed <33.570283> ; //delta=-5.60 - turn lthigh to y-axis <14.539997> speed <24.795082> ; //delta=-4.13 - move pelvis to z-axis [18.514709] speed [16.182152] ; //delta=2.70 - move pelvis to y-axis [-9.767603] speed [17.494217] ; //delta=-2.92 - turn pelvis to x-axis <83.165073> speed <207.470459> ; //delta=-34.58 - turn rfoot to x-axis <12.450249> speed <53.361562> ; //delta=-8.89 - turn rfoot to z-axis <6.862478> speed <0.895284> ; //delta=-0.15 - turn rfoot to y-axis <-1.278525> speed <6.393086> ; //delta=-1.07 - turn rleg to x-axis <-2.288166> speed <81.095700> ; //delta=13.52 - turn rleg to z-axis <-1.234413> speed <18.925144> ; //delta=3.15 - turn rleg to y-axis <0.052477> speed <6.587672> ; //delta=1.10 - turn rthigh to x-axis <12.131311> speed <90.853168> ; //delta=15.14 - turn rthigh to z-axis <-1.838792> speed <39.381207> ; //delta=6.56 - turn rthigh to y-axis <-16.901091> speed <30.167289> ; //delta=5.03 - sleep 164; - } -} - - -Killed(severity, corpsetype) -{ - hide rfire; - hide lfire; - if( severity <= 25 ) - { - call-script DeathAnim(); - corpsetype = 1 ; - explode pelvis type BITMAPONLY | NOHEATCLOUD; - explode lthigh type BITMAPONLY | NOHEATCLOUD; - explode lleg type BITMAPONLY | NOHEATCLOUD; - explode lfoot type BITMAPONLY | NOHEATCLOUD; - explode torso type BITMAPONLY | NOHEATCLOUD; - explode gun type BITMAPONLY | NOHEATCLOUD; - return(corpsetype); - } - if( severity <= 50 ) - { - corpsetype = 2 ; - explode pelvis type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode lthigh type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode lleg type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode lfoot type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode torso type FALL | NOHEATCLOUD; - explode gun type FIRE | SMOKE | FALL | NOHEATCLOUD; - return(corpsetype); - } - if( severity <= 99 ) - { - corpsetype = 3 ; - explode pelvis type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; - explode lthigh type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode lleg type SMOKE | FALL | NOHEATCLOUD; - explode lfoot type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode torso type FIRE | SMOKE | FALL | NOHEATCLOUD; - explode gun type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; - return(corpsetype); - } - corpsetype = 3 ; - explode pelvis type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - explode lthigh type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; - explode lleg type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - explode lfoot type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - explode torso type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - explode gun type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; - return corpsetype; -} diff --git a/scripts/Units/leggob_clean.cob b/scripts/Units/leggob_clean.cob deleted file mode 100644 index 0c8f37539ac..00000000000 Binary files a/scripts/Units/leggob_clean.cob and /dev/null differ diff --git a/scripts/Units/legheavydrone.bos b/scripts/Units/legheavydrone.bos new file mode 100644 index 00000000000..381571b6db7 --- /dev/null +++ b/scripts/Units/legheavydrone.bos @@ -0,0 +1,180 @@ + +#include "../recoil_common_includes.h" + +piece base, thruster, flwing, frwing, blwing, brwing, flblades, frblades, blblades, brblades, blades, flare, ringazimuth, ringelevation, armor, thrusttrail; + +static-var shotcount; + +#define SIGNAL_AIM1 256 + +#define IDLEHOVERSCALE 24 +#define IDLEHOVERSPEED 30 +#define IDLEBASEPIECE base +#include "../idlehover.h" + +#define BASEPIECE base +#define HITSPEED <105.0> +//how 'heavy' the unit is, on a scale of 1-10 +#define UNITSIZE 5 +#define MAXTILT 100 + +Create() +{ + hide flare; + turn ringazimuth to y-axis <0> now; + turn ringelevation to x-axis <-90> now; + SLEEP_UNTIL_UNITFINISHED; + call-script Activate(); + start-script IdleHover(); +} + +Activate() +{ + spin flblades around y-axis speed <600>; + spin frblades around y-axis speed <-600>; + spin blblades around y-axis speed <-600>; + spin brblades around y-axis speed <600>; + spin blades around z-axis speed <200>; + + turn flwing to z-axis <-15> speed <60>; + turn frwing to z-axis <15> speed <60>; + turn blwing to z-axis <-15> speed <60>; + turn brwing to z-axis <15> speed <60>; + + turn flwing to y-axis <-15> speed <60>; + turn frwing to y-axis <15> speed <60>; + turn blwing to y-axis <15> speed <60>; + turn brwing to y-axis <-15> speed <60>; + + turn thruster to x-axis <0> speed <90>; + show thrusttrail; +} + +Deactivate() +{ + stop-spin flblades around y-axis decelerate <10>; + stop-spin frblades around y-axis decelerate <10>; + stop-spin blblades around y-axis decelerate <10>; + stop-spin brblades around y-axis decelerate <10>; + stop-spin blades around z-axis decelerate <10>; + + turn flwing to z-axis <30> speed <30>; + turn frwing to z-axis <-30> speed <30>; + turn blwing to z-axis <30> speed <30>; + turn brwing to z-axis <-30> speed <30>; + + turn flwing to y-axis <0> speed <60>; + turn frwing to y-axis <0> speed <60>; + turn blwing to y-axis <0> speed <60>; + turn brwing to y-axis <0> speed <60>; + + turn thruster to x-axis <-90> speed <90>; + hide thrusttrail; + + turn ringazimuth to y-axis <0> speed <30>; + turn ringelevation to x-axis <-90> speed <30>; +} + +QueryWeapon1(pieceIndex) +{ + pieceIndex = flare; +} + +AimFromWeapon1(pieceIndex) +{ + pieceIndex = base; +} + +AimWeapon1(heading, pitch) +{ + signal SIGNAL_AIM1; + set-signal-mask SIGNAL_AIM1; + + turn thruster to x-axis <0> speed <90>; + + turn ringazimuth to y-axis heading speed <300>; + turn ringelevation to x-axis 0 - pitch speed <300>; + + return (1); +} + +lua_UnitScriptLight(lightIndex, count) +{ + return 0; +} + +FireWeapon1() +{ + ++shotcount; + emit-sfx 1024 + 0 from flare; + call-script lua_UnitScriptLight(1, shotcount); +} + +MoveRate0() +{ + turn thruster to x-axis <-90.0> speed <180.0>; +} + +MoveRate1() +{ + turn thruster to x-axis <-45.0> speed <180.0>; +} + +MoveRate2() +{ + turn thruster to x-axis <0.0> speed <180.0>; +} + +MoveRate3() +{ + turn thruster to x-axis <0.0> speed <180.0>; +} + +Killed(severity, corpsetype) +{ + if( severity <= 25 ) + { + corpsetype = 1 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode armor type BITMAPONLY | NOHEATCLOUD; + explode flwing type BITMAPONLY | NOHEATCLOUD; + explode frwing type BITMAPONLY | NOHEATCLOUD; + explode thruster type BITMAPONLY | NOHEATCLOUD; + explode ringazimuth type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode ringelevation type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + return(corpsetype); + } + if( severity <= 50 ) + { + corpsetype = 2 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode armor type BITMAPONLY | NOHEATCLOUD; + explode flwing type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode frwing type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode thruster type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode ringazimuth type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode ringelevation type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + return(corpsetype); + } + if( severity <= 99 ) + { + corpsetype = 3 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode armor type BITMAPONLY | NOHEATCLOUD; + explode flwing type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD; + explode frwing type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD; + explode thruster type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD; + explode ringazimuth type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode ringelevation type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + return(corpsetype); + } + corpsetype = 3 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode armor type BITMAPONLY | NOHEATCLOUD; + explode flwing type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode frwing type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode thruster type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode ringazimuth type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode ringelevation type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + return corpsetype; +} diff --git a/scripts/Units/legheavydrone.cob b/scripts/Units/legheavydrone.cob new file mode 100644 index 00000000000..73a8078c04c Binary files /dev/null and b/scripts/Units/legheavydrone.cob differ diff --git a/scripts/Units/legmlv.bos b/scripts/Units/legmlv.bos index 48d5bb93b46..7788d5d8c36 100644 --- a/scripts/Units/legmlv.bos +++ b/scripts/Units/legmlv.bos @@ -1,4 +1,5 @@ -#define TA // This is a TA script + +#include "../recoil_common_includes.h" #include "sfxtype.h" #include "exptype.h" @@ -123,6 +124,8 @@ Create() statechg_DesiredState = TRUE; statechg_StateChanging = FALSE; animSpeed = 4; + SLEEP_UNTIL_UNITFINISHED; + start-script RequestState(1); start-script WheelControl(); } diff --git a/scripts/Units/legmlv.cob b/scripts/Units/legmlv.cob index 2e6e8b44606..cc914ad8951 100644 Binary files a/scripts/Units/legmlv.cob and b/scripts/Units/legmlv.cob differ diff --git a/scripts/Units/legrail.bos b/scripts/Units/legrail.bos index 7194427b6a0..bb0fa045dc7 100644 --- a/scripts/Units/legrail.bos +++ b/scripts/Units/legrail.bos @@ -7,7 +7,7 @@ piece base, tracks, armor, aimy1, turret, aimx1, sleeve, barrel, flare; -static-var restore_delay, bAiming, wpn1_lasthead; +static-var restore_delay, bAiming, wpn1_lasthead, shotcount; #define TB_BASE base #define TB_TURNRATE <15.0> @@ -37,9 +37,9 @@ RockUnit(anglex, anglez) Create() { - hide flare; restore_delay = 3000; bAiming = 0; + shotcount = 0; call-script TB_Init(); SLEEP_UNTIL_UNITFINISHED; } @@ -109,10 +109,33 @@ AimPrimary(heading, pitch) FirePrimary() { + ++shotcount; emit-sfx 1024 + 0 from flare; + call-script lua_UnitScriptLight(1, shotcount); + + move barrel to z-axis [-6] now; + turn sleeve to x-axis <-10> now; + + turn sleeve to x-axis <0> speed <30.0>; + move barrel to z-axis [0] speed [2.5]; +} + +FireSecondary() +{ + ++shotcount; + emit-sfx 1024 + 0 from flare; + call-script lua_UnitScriptLight(2, shotcount); + move barrel to z-axis [-6] now; - wait-for-move barrel along z-axis; - move barrel to z-axis [0] speed [3]; + turn sleeve to x-axis <-10> now; + + turn sleeve to x-axis <0> speed <30.0>; + move barrel to z-axis [0] speed [2.5]; +} + +lua_UnitScriptLight(lightIndex, count) +{ + return 0; } AimFromPrimary(piecenum) diff --git a/scripts/Units/legrail.cob b/scripts/Units/legrail.cob index f49233ff648..2fa61181254 100644 Binary files a/scripts/Units/legrail.cob and b/scripts/Units/legrail.cob differ diff --git a/scripts/Units/legsrail.bos b/scripts/Units/legsrail.bos index d22c3a48394..fd6df411e79 100644 --- a/scripts/Units/legsrail.bos +++ b/scripts/Units/legsrail.bos @@ -1,13 +1,13 @@ #include "../recoil_common_includes.h" -piece flare1, pelvis, aimy1, turret, aimx1, turretarm, sleeve, barrel, sleelvedeco1, sleevedeco2, armor, +piece flare1, pelvis, aimy1, turret, aimx1, turretarm, sleeve, wedge, barrel, sleelvedeco1, sleevedeco2, armor, hingefl, hingefr, hingeml, hingemr, hingebl, hingebr, thighfl, thighfr, thighml, thighmr, thighbl, thighbr, legfl, legfr, legml, legmr, legbl, legbr, footfl, footfr, footml, footmr, footbl, footbr; -static-var isMoving, isAiming, animFramesPerKeyframe, wpn1_lasthead, animSpeed, maxSpeed; +static-var isMoving, isAiming, animFramesPerKeyframe, wpn1_lasthead, animSpeed, maxSpeed, shotcount; // Signal definitions #define SIGNAL_MOVE 1 @@ -15,8 +15,10 @@ static-var isMoving, isAiming, animFramesPerKeyframe, wpn1_lasthead, animSpeed, Walk() { set-signal-mask SIGNAL_MOVE; - while(isMoving) { - if (isMoving) { //Frame:5 + while(isMoving) + { + if (isMoving) + { //Frame:5 turn footbl to x-axis <11.734221> speed <1601.270334> / animSpeed; turn footbr to x-axis <-19.554439> speed <131.189578> / animSpeed; turn footfl to x-axis <28.268784> speed <201.432114> / animSpeed; @@ -39,18 +41,22 @@ Walk() { move pelvis to z-axis [-0.818277] speed [51.827234] / animSpeed; move pelvis to y-axis [-0.334620] speed [5.485481] / animSpeed; turn pelvis to z-axis <-0.988276> speed <56.842659> / animSpeed; - turn pelvis to y-axis <5.579736> speed <50.227004> / animSpeed; - turn sleeve to x-axis <0.787965> speed <41.247301> / animSpeed; + turn pelvis to y-axis <5.579736> speed <50.227004> / animSpeed; turn thighbl to x-axis <10.742751> speed <279.233707> / animSpeed; turn thighbr to x-axis <1.349023> speed <99.483460> / animSpeed; turn thighfl to x-axis <-17.118426> speed <1204.706392> / animSpeed; turn thighfr to x-axis <-6.820407> speed <629.834082> / animSpeed; turn thighml to z-axis <2.686173> speed <92.232684> / animSpeed; turn thighmr to z-axis <19.749514> speed <681.192518> / animSpeed; - turn turret to y-axis <-5.579736> speed <50.227004> / animSpeed; + if (!isAiming) + { + turn sleeve to x-axis <0.787965> speed <41.247301> / animSpeed; + turn turret to y-axis <-5.579736> speed <50.227004> / animSpeed; + } sleep ((33*animSpeed) -1); } - if (isMoving) { //Frame:10 + if (isMoving) + { //Frame:10 turn footbl to x-axis <-24.172036> speed <1077.187700> / animSpeed; turn footbr to x-axis <9.911640> speed <883.982369> / animSpeed; turn footfl to x-axis <-1.749720> speed <900.555102> / animSpeed; @@ -74,17 +80,21 @@ Walk() { move pelvis to y-axis [0.489634] speed [24.727617] / animSpeed; turn pelvis to z-axis <-1.889954> speed <27.050341> / animSpeed; turn pelvis to y-axis <1.647128> speed <117.978236> / animSpeed; - turn sleeve to x-axis <2.377984> speed <47.700568> / animSpeed; turn thighbl to x-axis <16.783540> speed <181.223676> / animSpeed; turn thighbr to x-axis <-0.804866> speed <64.616670> / animSpeed; turn thighfl to x-axis <-31.955023> speed <445.097900> / animSpeed; turn thighfr to x-axis <13.934021> speed <622.632852> / animSpeed; turn thighml to z-axis <5.892777> speed <96.198111> / animSpeed; turn thighmr to z-axis <21.271977> speed <45.673885> / animSpeed; - turn turret to y-axis <-1.647128> speed <117.978236> / animSpeed; + if (!isAiming) + { + turn sleeve to x-axis <2.377984> speed <47.700568> / animSpeed; + turn turret to y-axis <-1.647128> speed <117.978236> / animSpeed; + } sleep ((33*animSpeed) -1); } - if (isMoving) { //Frame:15 + if (isMoving) + { //Frame:15 turn footbl to x-axis <-17.882982> speed <188.671613> / animSpeed; turn footbr to x-axis <54.333127> speed <1332.644604> / animSpeed; turn footfl to x-axis <-27.748062> speed <779.950260> / animSpeed; @@ -108,17 +118,21 @@ Walk() { move pelvis to y-axis [-0.159760] speed [19.481804] / animSpeed; turn pelvis to z-axis <-0.892497> speed <29.923719> / animSpeed; turn pelvis to y-axis <-3.940609> speed <167.632126> / animSpeed; - turn sleeve to x-axis <-0.602356> speed <89.410186> / animSpeed; turn thighbl to x-axis <-0.604949> speed <521.654688> / animSpeed; turn thighbr to x-axis <-0.167152> speed <19.131424> / animSpeed; turn thighfl to x-axis <-27.814876> speed <124.204395> / animSpeed; turn thighfr to x-axis <23.038453> speed <273.132964> / animSpeed; turn thighml to z-axis <2.924198> speed <89.057372> / animSpeed; turn thighmr to z-axis <0.385287> speed <626.600697> / animSpeed; - turn turret to y-axis <3.940609> speed <167.632113> / animSpeed; + if (!isAiming) + { + turn sleeve to x-axis <-0.602356> speed <89.410186> / animSpeed; + turn turret to y-axis <3.940609> speed <167.632113> / animSpeed; + } sleep ((33*animSpeed) -1); } - if (isMoving) { //Frame:20 + if (isMoving) + { //Frame:20 turn footbl to x-axis <-13.689697> speed <125.798561> / animSpeed; turn footbr to x-axis <3.045171> speed <1538.638687> / animSpeed; turn footfl to x-axis <-6.322310> speed <642.772544> / animSpeed; @@ -142,17 +156,21 @@ Walk() { move pelvis to y-axis [-0.328326] speed [5.056994] / animSpeed; turn pelvis to z-axis <1.001793> speed <56.828705> / animSpeed; turn pelvis to y-axis <-5.568595> speed <48.839562> / animSpeed; - turn sleeve to x-axis <0.816850> speed <42.576182> / animSpeed; turn thighbl to x-axis <1.808738> speed <72.410618> / animSpeed; turn thighbr to x-axis <12.208492> speed <371.269319> / animSpeed; turn thighfl to x-axis <-7.231227> speed <617.509480> / animSpeed; turn thighfr to x-axis <-17.339902> speed <1211.350664> / animSpeed; turn thighml to z-axis <-20.296915> speed <696.633371> / animSpeed; turn thighmr to z-axis <-2.630343> speed <90.468896> / animSpeed; - turn turret to y-axis <5.568595> speed <48.839588> / animSpeed; + if (!isAiming) + { + turn sleeve to x-axis <0.816850> speed <42.576182> / animSpeed; + turn turret to y-axis <5.568595> speed <48.839588> / animSpeed; + } sleep ((33*animSpeed) -1); } - if (isMoving) { //Frame:25 + if (isMoving) + { //Frame:25 turn footbl to x-axis <17.318110> speed <930.234216> / animSpeed; turn footbr to x-axis <-32.560652> speed <1068.174693> / animSpeed; turn footfl to x-axis <8.745823> speed <452.044011> / animSpeed; @@ -176,17 +194,21 @@ Walk() { move pelvis to y-axis [0.491268] speed [24.587812] / animSpeed; turn pelvis to z-axis <1.889423> speed <26.628911> / animSpeed; turn pelvis to y-axis <-1.600933> speed <119.029857> / animSpeed; - turn sleeve to x-axis <2.364228> speed <46.421331> / animSpeed; turn thighbl to x-axis <-1.170184> speed <89.367654> / animSpeed; turn thighbr to x-axis <18.595549> speed <191.611702> / animSpeed; turn thighfl to x-axis <13.490243> speed <621.644118> / animSpeed; turn thighfr to x-axis <-32.416863> speed <452.308838> / animSpeed; turn thighml to z-axis <-21.791094> speed <44.825370> / animSpeed; turn thighmr to z-axis <-5.847593> speed <96.517495> / animSpeed; - turn turret to y-axis <1.600933> speed <119.029870> / animSpeed; + if (!isAiming) + { + turn sleeve to x-axis <2.364228> speed <46.421331> / animSpeed; + turn turret to y-axis <1.600933> speed <119.029870> / animSpeed; + } sleep ((33*animSpeed) -1); } - if (isMoving) { //Frame:30 + if (isMoving) + { //Frame:30 turn footbl to x-axis <65.037574> speed <1431.583898> / animSpeed; turn footbr to x-axis <-24.152128> speed <252.255740> / animSpeed; turn footfl to x-axis <21.634037> speed <386.646405> / animSpeed; @@ -209,14 +231,17 @@ Walk() { move pelvis to y-axis [-0.167703] speed [19.769117] / animSpeed; turn pelvis to z-axis <0.878452> speed <30.329149> / animSpeed; turn pelvis to y-axis <3.975438> speed <167.291118> / animSpeed; - turn sleeve to x-axis <-0.617353> speed <89.447431> / animSpeed; turn thighbl to x-axis <1.432891> speed <78.092252> / animSpeed; turn thighbr to x-axis <-1.902584> speed <614.943990> / animSpeed; turn thighfl to x-axis <23.038453> speed <286.446300> / animSpeed; turn thighfr to x-axis <-27.814876> speed <138.059604> / animSpeed; turn thighml to z-axis <-0.382104> speed <642.269687> / animSpeed; turn thighmr to z-axis <-2.871668> speed <89.277748> / animSpeed; - turn turret to y-axis <-3.975438> speed <167.291118> / animSpeed; + if (!isAiming) + { + turn sleeve to x-axis <-0.617353> speed <89.447431> / animSpeed; + turn turret to y-axis <-3.975438> speed <167.291118> / animSpeed; + } sleep ((33*animSpeed) -1); } } @@ -241,7 +266,6 @@ StopWalking() { turn legmr to z-axis <0> speed <1421.032536> / animSpeed; turn pelvis to y-axis <0> speed <335.264252> / animSpeed; turn pelvis to z-axis <0> speed <113.685318> / animSpeed; - turn sleeve to x-axis <0> speed <178.894862> / animSpeed; turn thighbl to x-axis <0> speed <1043.309377> / animSpeed; turn thighbr to x-axis <0> speed <1229.887981> / animSpeed; turn thighfl to x-axis <0> speed <2409.412785> / animSpeed; @@ -254,7 +278,6 @@ StopWalking() { turn hingefr to y-axis <-30> speed <758.133991> / animSpeed; turn hingeml to y-axis <0> speed <1745.007593> / animSpeed; turn hingemr to y-axis <0> speed <1724.420028> / animSpeed; - turn turret to y-axis <0> speed <335.264226> / animSpeed; } // REMEMBER TO animspeed = 5 in Create() !! @@ -291,13 +314,12 @@ StopMoving(){ Create() { - hide flare1; hide aimy1; hide aimX1; isAiming = FALSE; animSpeed = 5; start-script UnitSpeed(); - + shotcount=0; turn hingebl to y-axis <-30> now; turn hingebr to y-axis <30> now; turn hingefl to y-axis <30> now; @@ -305,6 +327,14 @@ Create() turn hingeml to y-axis <0> now; turn hingemr to y-axis <0> now; + // Turn this unit into a grilled cheese maker + hide wedge; + if (rand(0, 100) >= 98) + { + move wedge to y-axis [5] now; + show wedge; + } + spin sleelvedeco1 around z-axis speed <360> accelerate <6>; spin sleevedeco2 around z-axis speed <-360> accelerate <6>; } @@ -360,8 +390,8 @@ AimPrimary(heading, pitch) turn aimy1 to y-axis heading speed <60.0>; - turn aimx1 to x-axis 0 - (pitch / 2) speed <30.0>; - turn sleeve to x-axis 0 - (pitch / 2) speed <30.0>; + turn aimx1 to x-axis 0 + (pitch / 2) speed <30.0>; + turn sleeve to x-axis 0 - (pitch) - (pitch / 2) speed <90.0>; if (((get ABS(wpn1_lasthead - heading)) > 65536) OR(((get ABS(wpn1_lasthead - heading)) > <2>) AND ((get ABS(wpn1_lasthead - heading)) < 65536 - <2>))) { @@ -375,21 +405,80 @@ AimPrimary(heading, pitch) return (1); } -FirePrimary() +AimSecondary(heading, pitch) { + isAiming = TRUE; + signal SIGNAL_AIM; + + turn aimy1 to y-axis heading speed <60.0>; + + turn aimx1 to x-axis 0 + (pitch / 2) speed <60.0>; + turn sleeve to x-axis 0 - (pitch) - (pitch / 2) speed <160.0>; + + if (((get ABS(wpn1_lasthead - heading)) > 65536) OR(((get ABS(wpn1_lasthead - heading)) > <2>) AND ((get ABS(wpn1_lasthead - heading)) < 65536 - <2>))) + { + wpn1_lasthead = 1000000; + wait-for-turn aimy1 around y-axis; + wait-for-turn aimx1 around x-axis; + } + wpn1_lasthead = heading; + start-script RestoreAfterDelay(); + return (1); +} + +FirePrimary() +{ + ++shotcount; emit-sfx 1024 + 0 from flare1; - sleep 1; + call-script lua_UnitScriptLight(1, shotcount); + + stop-spin sleelvedeco1 around z-axis decelerate <30>; + stop-spin sleevedeco2 around z-axis decelerate <30>; + + turn turretarm to x-axis <-5> speed <1500.0>; move barrel to z-axis [-10] speed [50]; + + wait-for-turn turretarm around x-axis; + sleep 100; + + turn turretarm to x-axis <0> speed <15.0>; + + sleep 500; + move barrel to z-axis [0.0] speed [8.0]; + spin sleelvedeco1 around z-axis speed <360> accelerate <6>; + spin sleevedeco2 around z-axis speed <-360> accelerate <6>; +} + +FireSecondary() +{ + ++shotcount; + emit-sfx 1024 + 0 from flare1; + call-script lua_UnitScriptLight(2, shotcount); + stop-spin sleelvedeco1 around z-axis decelerate <30>; stop-spin sleevedeco2 around z-axis decelerate <30>; - sleep 750; + + turn turretarm to x-axis <-5> speed <1500.0>; + move barrel to z-axis [-10] speed [50]; + + wait-for-turn turretarm around x-axis; + sleep 100; + + turn turretarm to x-axis <0> speed <15.0>; + + sleep 500; move barrel to z-axis [0.0] speed [8.0]; spin sleelvedeco1 around z-axis speed <360> accelerate <6>; spin sleevedeco2 around z-axis speed <-360> accelerate <6>; } +lua_UnitScriptLight(lightIndex, count) +{ + return 0; +} + Killed(severity, corpsetype) { if( severity <= 25 ) diff --git a/scripts/Units/legsrail.cob b/scripts/Units/legsrail.cob index 772eacae07b..4e3e06aa38d 100644 Binary files a/scripts/Units/legsrail.cob and b/scripts/Units/legsrail.cob differ diff --git a/unitpics/legdrone.dds b/unitpics/legdrone.dds new file mode 100644 index 00000000000..2295f61d9b1 Binary files /dev/null and b/unitpics/legdrone.dds differ diff --git a/unitpics/leggob.dds b/unitpics/leggob.dds index 7ed09702300..7308bb458a8 100644 Binary files a/unitpics/leggob.dds and b/unitpics/leggob.dds differ diff --git a/unitpics/legheavydrone.dds b/unitpics/legheavydrone.dds new file mode 100644 index 00000000000..dca37024a55 Binary files /dev/null and b/unitpics/legheavydrone.dds differ diff --git a/units/Legion/Air/T2 Air/legheavydrone.lua b/units/Legion/Air/T2 Air/legheavydrone.lua new file mode 100644 index 00000000000..a887cb09bd1 --- /dev/null +++ b/units/Legion/Air/T2 Air/legheavydrone.lua @@ -0,0 +1,118 @@ +return { + legheavydrone = { + maxacc = 0.15, + blocking = false, + maxdec = 0.35, + energycost = 1000, + metalcost = 90, + buildpic = "legheavydrone.DDS", + buildtime = 5000, + canfly = true, + canmove = true, + cantbetransported = false, + category = "ALL WEAPON VTOL NOTSUB NOTHOVER", + collide = true, + cruisealtitude = 68, + explodeas = "tinyExplosionGeneric", + footprintx = 2, + footprintz = 2, + hoverattack = true, + idleautoheal = 0, + idletime = 1800, + health = 2250, + maxslope = 10, + speed = 180.5, + maxwaterdepth = 0, + nochasecategory = "COMMANDER VTOL", + objectname = "Units/LEGHEAVYDRONE.s3o", + repairable = false, + script = "Units/LEGHEAVYDRONE.cob", + seismicsignature = 0, + selfdestructas = "tinyExplosionGenericSelfd", + sightdistance = 750, + turninplaceanglelimit = 360, + turnrate = 750, + upright = true, + customparams = { + model_author = "Tharsis", + normaltex = "unittextures/leg_normal.dds", + subfolder = "coraircraft", + drone = 1, + nohealthbars = 1, + }, + sfxtypes = { + pieceexplosiongenerators = { + [1] = "airdeathceg2", + }, + }, + sounds = { + canceldestruct = "cancel2", + underattack = "warning1", + cant = { + [1] = "cantdo4", + }, + count = { + [1] = "count6", + [2] = "count5", + [3] = "count4", + [4] = "count3", + [5] = "count2", + [6] = "count1", + }, + ok = { + [1] = "vtolcrmv", + }, + select = { + [1] = "vtolcrac", + }, + }, + weapondefs = { + heat_ray = { + areaofeffect = 8, + avoidfeature = false, + beamtime = 0.33, + corethickness = 0.23, + craterareaofeffect = 0, + craterboost = 0, + cratermult = 0, + edgeeffectiveness = 0.15, + explosiongenerator = "custom:laserhit-small", + firestarter = 30, + impactonly = 1, + impulseboost = 0, + impulsefactor = 0, + laserflaresize = 10, + name = "a2g Heat Ray", + noselfdamage = true, + predictboost = 1, + range = 430, + reloadtime = 0.8, + rgbcolor = "1 0.55 0", + rgbcolor2 = "0.9 1.0 0.5", + soundhitdry = "", + soundhitwet = "sizzle", + soundstart = "heliosfire", + soundtrigger = 1, + --targetmoveerror = 1, + thickness = 2.0, + tolerance = 10000, + turret = true, + weapontype = "BeamLaser", + weaponvelocity = 950, + damage = { + default = 120, + vtol = 20, + }, + }, + }, + weapons = { + [1] = { + badtargetcategory = "VTOL", + def = "HEAT_RAY", + maindir = "0 0 1", + maxangledif = 270, + onlytargetcategory = "NOTSUB", + }, + }, + }, +} diff --git a/units/Legion/Air/legdrone.lua b/units/Legion/Air/legdrone.lua index 1b30577e7fb..ec369c3101e 100644 --- a/units/Legion/Air/legdrone.lua +++ b/units/Legion/Air/legdrone.lua @@ -5,7 +5,7 @@ return { maxdec = 0.55, energycost = 500, metalcost = 15, - buildpic = "CORBW.DDS", + buildpic = "legdrone.DDS", buildtime = 1000, canfly = true, canmove = true, diff --git a/units/Legion/Bots/T2 Bots/legshot.lua b/units/Legion/Bots/T2 Bots/legshot.lua index 5eea18249a1..821884a6d81 100644 --- a/units/Legion/Bots/T2 Bots/legshot.lua +++ b/units/Legion/Bots/T2 Bots/legshot.lua @@ -74,6 +74,9 @@ return { }, }, sfxtypes = { + explosiongenerators = { + [1] = "custom:barrelshot-small-impulse", + }, pieceexplosiongenerators = { [1] = "deathceg2", [2] = "deathceg3", @@ -104,36 +107,43 @@ return { }, weapondefs = { shotgun = { - areaofeffect = 50, + accuracy = 7, + areaofeffect = 16, avoidfeature = false, + projectiles = 14, + burnblow = false, + craterareaofeffect = 0, craterboost = 0, cratermult = 0, - edgeeffectiveness = 0.65, - explosiongenerator = "custom:genericshellexplosion-small", - impulseboost = 0.2, - impulsefactor = 0.2, - intensity = 3, - name = "GaussCannon", + duration = 0.015, + edgeeffectiveness = 0.85, + explosiongenerator = "custom:plasmahit-sparkonly", + fallOffRate = 0.2, + firestarter = 0, + impulseboost = 0.4, + impulsefactor = 1.5, + intensity = 0.8, + name = "Medium Shotgun", noselfdamage = true, - predictboost = 1, - projectiles = 6, - range = 320, - reloadtime = 3, - rgbcolor = "1 0.75 0.25", - size = 2, - soundhit = "xplomed2xs", - soundhitwet = "splsmed", + ownerExpAccWeight = 4.0, + proximitypriority = 3, + range = 321, + reloadtime = 2, + rgbcolor = "1 0.95 0.4", + soundhit = "bimpact3", + soundhitwet = "splshbig", soundstart = "kroggie2xs", - soundstartvolume = 12, - sprayangle = 1500, + soundstartvolume = 3, + sprayangle = 1900, + thickness = 0.6, + tolerance = 6000, turret = true, - weapontimer = 1, - weapontype = "Cannon", - weaponvelocity = 600, + weapontype = "LaserCannon", + weaponvelocity = 960, damage = { - default = 125, + default = 40, + vtol = 13, }, - }, }, weapons = { [1] = { diff --git a/units/Legion/Bots/leggob.lua b/units/Legion/Bots/leggob.lua index 7b8ef26d7a1..1f911a0cda3 100644 --- a/units/Legion/Bots/leggob.lua +++ b/units/Legion/Bots/leggob.lua @@ -8,8 +8,8 @@ return { buildtime = 750, canmove = true, category = "BOT MOBILE WEAPON ALL NOTSUB NOTSHIP NOTAIR NOTHOVER SURFACE EMPABLE", - collisionvolumeoffsets = "0 -4 0", - collisionvolumescales = "14 22 14", + collisionvolumeoffsets = "0 -2 0", + collisionvolumescales = "18 22 18", collisionvolumetype = "CylY", corpse = "DEAD", explodeas = "smallexplosiongeneric", @@ -35,8 +35,8 @@ return { upright = true, customparams = { unitgroup = 'weapon', - model_author = "Mr Bob", - normaltex = "unittextures/cor_normal.dds", + model_author = "Odin", + normaltex = "unittextures/leg_normal.dds", subfolder = "corbots", weapon1turretx = 300, weapon1turrety = 300, diff --git a/units/Legion/Legion EvoCom/legcomlvl10.lua b/units/Legion/Legion EvoCom/legcomlvl10.lua index a3fe802e508..03522749634 100644 --- a/units/Legion/Legion EvoCom/legcomlvl10.lua +++ b/units/Legion/Legion EvoCom/legcomlvl10.lua @@ -24,7 +24,7 @@ return { collisionvolumetype = "CylY", corpse = "DEAD", energymake = 2000, - energystorage = 100, + energystorage = 10000, explodeas = "commanderExplosion", footprintx = 2, footprintz = 2, @@ -460,13 +460,13 @@ return { }, customparams = { attackformationspread = 50, - carried_unit = "legdrone", --Name of the unit spawned by this carrier unit. - engagementrange = 1000, + carried_unit = "legheavydrone", --Name of the unit spawned by this carrier unit. + engagementrange = 2400, spawns_surface = "LAND", -- "LAND" or "SEA". The SEA option has not been tested currently. spawnrate = 1, --Spawnrate roughly in seconds. maxunits = 2, --Will spawn units until this amount has been reached. - energycost = 50, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. - metalcost = 0, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. + energycost = 1000, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. + metalcost = 90, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. controlradius = 1100, --The spawned units should stay within this radius. Unfinished behavior may cause exceptions. Planned: radius = 0 to disable radius limit. decayrate = 4, carrierdeaththroe = "death", diff --git a/units/Legion/Legion EvoCom/legcomlvl8.lua b/units/Legion/Legion EvoCom/legcomlvl8.lua index bf09406e804..eafe6c30cdc 100644 --- a/units/Legion/Legion EvoCom/legcomlvl8.lua +++ b/units/Legion/Legion EvoCom/legcomlvl8.lua @@ -24,7 +24,7 @@ return { collisionvolumetype = "CylY", corpse = "DEAD", energymake = 850, - energystorage = 500, + energystorage = 5000, explodeas = "commanderExplosion", footprintx = 2, footprintz = 2, @@ -460,13 +460,13 @@ return { }, customparams = { attackformationspread = 50, - carried_unit = "legdrone", --Name of the unit spawned by this carrier unit. - engagementrange = 1000, + carried_unit = "legheavydrone", --Name of the unit spawned by this carrier unit. + engagementrange = 1200, spawns_surface = "LAND", -- "LAND" or "SEA". The SEA option has not been tested currently. spawnrate = 3, --Spawnrate roughly in seconds. maxunits = 2, --Will spawn units until this amount has been reached. - energycost = 50, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. - metalcost = 0, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. + energycost = 1000, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. + metalcost = 90, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. controlradius = 1100, --The spawned units should stay within this radius. Unfinished behavior may cause exceptions. Planned: radius = 0 to disable radius limit. decayrate = 4, carrierdeaththroe = "death", diff --git a/units/Legion/Legion EvoCom/legcomlvl9.lua b/units/Legion/Legion EvoCom/legcomlvl9.lua index 899358cf0ef..8cf9690133a 100644 --- a/units/Legion/Legion EvoCom/legcomlvl9.lua +++ b/units/Legion/Legion EvoCom/legcomlvl9.lua @@ -24,7 +24,7 @@ return { collisionvolumetype = "CylY", corpse = "DEAD", energymake = 1375, - energystorage = 100, + energystorage = 8000, explodeas = "commanderExplosion", footprintx = 2, footprintz = 2, @@ -465,13 +465,13 @@ return { }, customparams = { attackformationspread = 50, - carried_unit = "legdrone", --Name of the unit spawned by this carrier unit. - engagementrange = 1000, + carried_unit = "legheavydrone", --Name of the unit spawned by this carrier unit. + engagementrange = 1800, spawns_surface = "LAND", -- "LAND" or "SEA". The SEA option has not been tested currently. spawnrate = 2, --Spawnrate roughly in seconds. maxunits = 2, --Will spawn units until this amount has been reached. - energycost = 50, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. - metalcost = 0, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. + energycost = 1000, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. + metalcost = 90, --Custom spawn cost. Remove this or set = nil to inherit the cost from the carried_unit unitDef. Cost inheritance is currently not working. controlradius = 1100, --The spawned units should stay within this radius. Unfinished behavior may cause exceptions. Planned: radius = 0 to disable radius limit. decayrate = 4, carrierdeaththroe = "death", diff --git a/unittextures/leg_color.dds b/unittextures/leg_color.dds index b0785c554f6..6c8a2a6d351 100644 Binary files a/unittextures/leg_color.dds and b/unittextures/leg_color.dds differ diff --git a/unittextures/leg_normal.dds b/unittextures/leg_normal.dds index 6e3401c9653..2c4c1aacd6e 100644 Binary files a/unittextures/leg_normal.dds and b/unittextures/leg_normal.dds differ diff --git a/unittextures/leg_shader.dds b/unittextures/leg_shader.dds index a16cd814818..5236e650951 100644 Binary files a/unittextures/leg_shader.dds and b/unittextures/leg_shader.dds differ diff --git a/unittextures/leg_wreck_color.dds b/unittextures/leg_wreck_color.dds index e90909291ea..00cedf0e8af 100644 Binary files a/unittextures/leg_wreck_color.dds and b/unittextures/leg_wreck_color.dds differ diff --git a/unittextures/leg_wreck_normal.dds b/unittextures/leg_wreck_normal.dds index 70d46cd52ba..7577bfc7ced 100644 Binary files a/unittextures/leg_wreck_normal.dds and b/unittextures/leg_wreck_normal.dds differ diff --git a/unittextures/leg_wreck_shader.dds b/unittextures/leg_wreck_shader.dds index afb2651a7bb..474d24a936a 100644 Binary files a/unittextures/leg_wreck_shader.dds and b/unittextures/leg_wreck_shader.dds differ