Alixibus #2 [436.0]
348 rounds, 281 wins, 66 losses, 1 draws
Ships
RocketPlatform
local turnLeft = false
local friendly = false
function Update()
local angVel = gyro:AngVel()
if FrontRanger:IsAlly() == true then
friendly = true
end
if (FrontRanger:Range() > 0 and FrontRanger:IsAlly() == false) then
TopThrustLeft:SetThrust(-angVel)
TopThrustRight:SetThrust(angVel)
BottomThrustLeft:SetThrust(angVel)
BottomThrustRight:SetThrust(-angVel)
RocketTwo:Fire()
RocketThree:Fire()
RocketFour:Fire()
RocketSix:Fire()
RocketSeven:Fire()
RocketEight:Fire()
if angVel > 0 then
turnLeft = false
else
turnLeft = true
end
if FrontRanger.alive == false then
RocketTwo:Fire()
RocketThree:Fire()
RocketFour:Fire()
RocketSix:Fire()
RocketSeven:Fire()
RocketEight:Fire()
end
else
local desiredAngVel = turnLeft and 45 or -45
TopThrustLeft:SetThrust(desiredAngVel - angVel)
TopThrustRight:SetThrust(angVel - desiredAngVel)
BottomThrustLeft:SetThrust(angVel - desiredAngVel)
BottomThrustRight:SetThrust(desiredAngVel - angVel)
end
end