local main_loop = loadfile("squirrelscripts/main_ai_loop.nut");

function init() {
	foreach(squad in my_squads)
	    squad.select();
	order_move(20000, 25000);
	stage <- 0;
}

function run_ai() {
	if (stage == 1)
		return;

	foreach(squad in my_squads) {
		if (squad.is_moving())
			return;
	}
	
	foreach(squad in my_squads)
	    squad.select();
	order_move(0, 30000);
	stage = 1;
}

main_loop();