Code:
function Create(self)
--working variables
self.Turret = {};
--create the turrets.
self.Turret[1] = CreateACrab("<Preset Name>");
MovableMan:AddActor(self.Turret[1]);
self.Turret[1].Offset = Vector(-3,-31);
end
function Destroy(self)
for i = 1, #self.Turret do
if MovableMan:IsActor(self.Turret[i]) == true then
if self.Health < 1 then
self.Turret[i]:GibThis()
else
self.Turret[i].ToDelete = true
end
end
end
end
function Update(self)
--update turret spatial properties
for i = 1, #self.Turret do
if MovableMan:IsActor(self.Turret[i]) == true then
--basic turret position upkeep (so it doesn't fall at 999999m/s)
self.Turret[i].Vel.X = 0;
self.Turret[i].Vel.Y = 0;
--update turret position
self.Turret[i].RotAngle = self.RotAngle;
self.Turret[i].Pos = self.Pos + self:RotateOffset(self.Turret[i].Offset)
end
end
end
Code:
self.Turret[2] = CreateACrab("<Preset Name>");
MovableMan:AddActor(self.Turret[1]);
self.Turret[2].Offset = Vector(-3,-31);
Copy this under the self.turret[1] for additional turrets.
Lua i learned from the Coalition heavy dropship.
Hope this help, i dont know what you mean about below front but above the top though. Maybe in the middle?