forked from FAForever/fa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUAB2305_script.lua
47 lines (42 loc) · 1.8 KB
/
UAB2305_script.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
-----------------------------------------------------------------
-- File : /cdimage/units/UAB2305/UAB2305_script.lua
-- Author(s): John Comes, David Tomandl
-- Summary : Aeon Tactical Missile Launcher Script
-- Copyright © 2005 Gas Powered Games, Inc. All rights reserved.
-----------------------------------------------------------------
local AStructureUnit = import("/lua/aeonunits.lua").AStructureUnit
local AIFQuantumWarhead = import("/lua/aeonweapons.lua").AIFQuantumWarhead
---@class UAB2305 : AStructureUnit
UAB2305 = ClassUnit(AStructureUnit) {
Weapons = {
QuantumMissiles = ClassWeapon(AIFQuantumWarhead) {
UnpackEffects01 = { '/effects/emitters/aeon_nuke_unpack_01_emit.bp', },
PlayFxWeaponUnpackSequence = function(self)
for k, v in self.UnpackEffects01 do
CreateAttachedEmitter(self.unit, 'B04', self.unit.Army, v)
end
AIFQuantumWarhead.PlayFxWeaponUnpackSequence(self)
end,
},
},
OnStopBeingBuilt = function(self, builder, layer)
AStructureUnit.OnStopBeingBuilt(self, builder, layer)
local bp = self.Blueprint
self.Trash:Add(CreateAnimator(self):PlayAnim(bp.Display.AnimationOpen))
self.Trash:Add(ForkThread(self.PlayArmSounds,self))
end,
PlayArmSounds = function(self)
local myBlueprint = self.Blueprint
if myBlueprint.Audio.Open and myBlueprint.Audio.Activate then
WaitTicks(48)
self:PlaySound(myBlueprint.Audio.Activate)
WaitTicks(38)
self:PlaySound(myBlueprint.Audio.Activate)
WaitTicks(39)
self:PlaySound(myBlueprint.Audio.Activate)
end
end,
}
TypeClass = UAB2305
-- Kept for mod support
local EffectUtil = import("/lua/effectutilities.lua")