Log in

twin97 #6 [373.4]

259 rounds, 200 wins, 56 losses, 3 draws

Ships

autoRocket

{"name": "autoRocket", "parts": [{"type": "brain","pos": [0,0],"rot": 0,"welds": [13,14,15,26]},{"type": "hull","pos": [-1,1],"rot": 0,"welds": [12,13,14,20]},{"type": "hull","pos": [-1,-1],"rot": 0,"welds": [11,13,23,26]},{"type": "hull","pos": [1,-1],"rot": 0,"welds": [10,15,22,26]},{"type": "hull","pos": [1,1],"rot": 0,"welds": [9,14,15,21]},{"name": "rangerT","type": "ranger","pos": [0,2],"rot": 0,"welds": [14]},{"name": "rangerR","type": "ranger","pos": [2,0],"rot": 3,"welds": [15]},{"name": "rangerD","type": "ranger","pos": [0,-2],"rot": 2,"welds": [26]},{"name": "rangerL","type": "ranger","pos": [-2,0],"rot": 1,"welds": [13]},{"name": "TRT","type": "rocket_launcher","pos": [1,2],"rot": 0},{"name": "RDT","type": "rocket_launcher","pos": [2,-1],"rot": 3},{"name": "DLT","type": "rocket_launcher","pos": [-1,-2],"rot": 2},{"name": "LTT","type": "rocket_launcher","pos": [-2,1],"rot": 1},{"type": "hull","pos": [-1,0],"rot": 0},{"type": "hull","pos": [0,1],"rot": 0},{"type": "hull","pos": [1,0],"rot": 0},{"name": "TLT","type": "rocket_launcher","pos": [-1,3],"rot": 0,"welds": [20]},{"name": "RTT","type": "rocket_launcher","pos": [3,1],"rot": 3,"welds": [21]},{"name": "DRT","type": "rocket_launcher","pos": [1,-3],"rot": 2,"welds": [22]},{"name": "LDT","type": "rocket_launcher","pos": [-3,-1],"rot": 1,"welds": [23]},{"type": "hull","pos": [-1,2],"rot": 0,"welds": [24]},{"type": "hull","pos": [2,1],"rot": 0},{"type": "hull","pos": [1,-2],"rot": 0,"welds": [25]},{"type": "hull","pos": [-2,-1],"rot": 0},{"name": "leftThrust","type": "thruster","pos": [-2,2],"rot": 3},{"name": "rightThrust","type": "thruster","pos": [2,-2],"rot": 1},{"name": "gyro","type": "gyroscope","pos": [0,-1],"rot": 0}]}
local fired = false
function Update()
local angVel = gyro:AngVel()
leftThrust:SetThrust(45 - angVel)
rightThrust:SetThrust(45 - angVel)
	if rangerT:Range() > 0 and not rangerT:IsAlly() then
		TRT:Fire()
		TLT:Fire()
		fired = true
	else
		fired = false
	end
	if rangerR:Range() > 0 and not rangerR:IsAlly() then
		RTT:Fire()
		RDT:Fire()
		fired = true
	else
		fired = false
	end
	if rangerD:Range() > 0 and not rangerD:IsAlly() then
		DRT:Fire()
		DLT:Fire()
		fired = true
	else
		fired = false		
	end
	if rangerL:Range() > 0 and not rangerL:IsAlly() then
		LTT:Fire()
		LDT:Fire()
		fired = true
	else
		fired = false		
	end
end