
DisplayTrace("Test01");

function Start()
        RunScript( "GB_come_in", 2000);
        RunScript( "GB_put_in_motion_01", 2000);
        RunScript( "GB_put_in_motion_02", 2000);
        Suicide();
end;

function GB_come_in()
        if (GetNUnitsInArea(0, "Zone_01") > 0) or (GetNUnitsInArea(0, "Zone_02") > 0) then
                LandReinforcement(100);
		Suicide();
 	end; 	
end;

function GB_put_in_motion_01()
local GerZone_01 = GetNUnitsInArea(0, "Zone_01");
local GerZone_02 = GetNUnitsInArea(0, "Zone_02");
        if ( GetNScriptUnitsInArea(2222, "Test") > 0) + (GerZone_01 > GerZone_02) then
                Cmd(0, 100, GetScriptAreaParams("Zone_02"));
                KillScript("GB_put_in_motion_02");
		Suicide();	
 	end;          	
end;

function GB_put_in_motion_02()
local GerZone_01 = GetNUnitsInArea(0, "Zone_01");
local GerZone_02 = GetNUnitsInArea(0, "Zone_02");
        if ( GetNScriptUnitsInArea(2222, "Test") > 0) + (GerZone_01 <= GerZone_02) then
                Cmd(0, 100, GetScriptAreaParams("Zone_01"));
                KillScript("GB_put_in_motion_01");
		Suicide();	
 	end;          	
end;

function Init()
        RunScript("Start", 1000);
end;
