dofile("Scripts/utils.lua");

function Initialize()
	AIparts = utils.CreateSubsystems();
	AIparts:AddPeriodic("Spawn", 128, Spawn);
end

function Main()
	AIparts:Run();
end

function Spawn()
	if IsEventPresent(call_ship) then
		ScreenLog("SHIP SPAWNED!!!");
		local ship = CreateObject("Units/Ships/Battleships/American/USS_North_Caroline.dsc", -980, 0, -800);
		AssignPlayer(ship, "American");
	end
end
