'== included in the AI scripts file =='

'start out happy with where we are
If s.controller.goalx = 0 Then s.controller.goalx = s.x
If s.controller.goaly = 0 Then s.controller.goaly = s.y

'try to avoid collisions: sets gox & goy to point away from nearby ss
AI.setProximityAvoid(s)

s.controller.vars.init("holdrad", 120)

'never rotate
s.rot = 90

'fly in circles around the goal
AI.holdingPattern(s)

'look for a s.target
AI.getTarget(s, 1500)

Local gotheta# = ATan2(s.controller.goy, s.controller.gox)

If target <> Null
	'set the goal coords to the target (to circle them)
	 AI.setGoalTo(s, "target")
		
	'shoot
	'fireAIWeapons(s, 0, target.x,  target.y)'fire at current target coords
	AI.fireAIWeapons(s, 0)'fire at predicted target coords
EndIf


s.add_thrust(gotheta, 1.0, True)


