Files
supreme-mech-commander-2/units/HHMADDOGE/HHMADDOGE_Script.lua
T

87 lines
3.5 KiB
Lua

local TWalkingLandUnit = import('/lua/terranunits.lua').TWalkingLandUnit
local TDFHeavyPlasmaCannonWeapon = import('/lua/terranweapons.lua').TDFHeavyPlasmaGatlingCannonWeapon
local TDFGaussCannonWeapon = import("/lua/terranweapons.lua").TDFGaussCannonWeapon
local TDFRiotWeapon = import("/lua/terranweapons.lua").TDFRiotWeapon
local EffectUtils = import('/lua/effectutilities.lua')
local Effects = import('/lua/effecttemplates.lua')
---@class HHMADDOGE : TWalkingLandUnit
HHMADDOGE = Class(TWalkingLandUnit) {
Weapons = {
L_HAG = Class(TDFRiotWeapon)
{
PlayFxWeaponPackSequence = function(self)
if self.SpinManip then
self.SpinManip:SetTargetSpeed(0)
self.SpinManip2:SetTargetSpeed(0)
end
self.ExhaustEffects = EffectUtils.CreateBoneEffects(self.unit, 'L_Exhaust', self.unit:GetArmy(),
Effects.WeaponSteam01)
TDFRiotWeapon.PlayFxWeaponPackSequence(self)
end,
PlayFxRackSalvoChargeSequence = function(self)
if not self.SpinManip then
self.SpinManip = CreateRotator(self.unit, 'L_Gun_Barrel', 'z', nil, 270, 180, 60)
self.unit.Trash:Add(self.SpinManip)
end
if self.SpinManip then
self.SpinManip:SetTargetSpeed(500)
self.SpinManip2:SetTargetSpeed(500)
end
TDFRiotWeapon.PlayFxRackSalvoChargeSequence(self)
end,
PlayFxRackSalvoReloadSequence = function(self)
if self.SpinManip then
self.SpinManip:SetTargetSpeed(200)
self.SpinManip2:SetTargetSpeed(200)
end
self.ExhaustEffects = EffectUtils.CreateBoneEffects(self.unit, 'L_Exhaust', self.unit:GetArmy(),
Effects.WeaponSteam01)
TDFRiotWeapon.PlayFxRackSalvoChargeSequence(self)
end,
},
R_HAG = Class(TDFRiotWeapon)
{
PlayFxWeaponPackSequence = function(self)
if self.SpinManip then
self.SpinManip:SetTargetSpeed(0)
self.SpinManip2:SetTargetSpeed(0)
end
self.ExhaustEffects = EffectUtils.CreateBoneEffects(self.unit, 'R_Exhaust', self.unit:GetArmy(),
Effects.WeaponSteam01)
TDFRiotWeapon.PlayFxWeaponPackSequence(self)
end,
PlayFxRackSalvoChargeSequence = function(self)
if not self.SpinManip then
self.SpinManip2 = CreateRotator(self.unit, 'R_Gun_Barrel', 'z', nil, 270, 180, 60)
self.unit.Trash:Add(self.SpinManip)
end
if self.SpinManip then
self.SpinManip:SetTargetSpeed(500)
self.SpinManip2:SetTargetSpeed(500)
end
TDFRiotWeapon.PlayFxRackSalvoChargeSequence(self)
end,
PlayFxRackSalvoReloadSequence = function(self)
if self.SpinManip then
self.SpinManip:SetTargetSpeed(200)
self.SpinManip2:SetTargetSpeed(200)
end
self.ExhaustEffects = EffectUtils.CreateBoneEffects(self.unit, 'R_Exhaust', self.unit:GetArmy(),
Effects.WeaponSteam01)
TDFRiotWeapon.PlayFxRackSalvoChargeSequence(self)
end,
},
},
}
TypeClass = HHMADDOGE