dofile("Scripts/mission.lua");
dofile("Scripts/msl.lua");

function PostCreate()
	mission_lua.BasicMissionInitialize()
	AIparts:AddPeriodic("050. Tiger train", 40, func_050__Tiger_train, 0 + RandomHalf(40))
	AIparts:AddPeriodic("100. Landing_LaBreche", 40, func_100__Landing_LaBreche, 0 + RandomHalf(40))
	AIparts:AddPeriodic("107. Landing_LaBreche move to LaBreche", 40, func_107__Landing_LaBreche_move_to_LaBreche, 0 + RandomHalf(40))
	AIparts:AddPeriodic("103. Landing_LaBreche", 40, func_103__Landing_LaBreche, 0 + RandomHalf(40))
	AIparts:AddPeriodic("102. Landing_LaBreche", 40, func_102__Landing_LaBreche, 0 + RandomHalf(40))
	AIparts:AddPeriodic("104. Landing_LaBreche", 40, func_104__Landing_LaBreche, 0 + RandomHalf(40))
	AIparts:AddPeriodic("101. Landing_LaBreche_Firefly", 40, func_101__Landing_LaBreche_Firefly, 0 + RandomHalf(40))
	AIparts:AddPeriodic("099. ArtilleryStrike LaBreche", 40, func_099__ArtilleryStrike_LaBreche, 0 + RandomHalf(40))
	AIparts:AddOneTime("000. Presets", 40, func_000__Presets)
	AIparts:AddPeriodic("098. Airstrike Coastline", 40, func_098__Airstrike_Coastline, 0 + RandomHalf(40))
	AIparts:AddOneTime("000. Presets airplanes", 50, func_000__Presets_airplanes)
	AIparts:AddPeriodic("105. Landing_LaBreche_Sexton", 40, func_105__Landing_LaBreche_Sexton, 0 + RandomHalf(40))
	AIparts:AddPeriodic("106. Landing_LaBreche", 10, func_106__Landing_LaBreche, 0 + RandomHalf(10))
	AIparts:AddPeriodic("108. Fw-190 to Beach LaBreche", 40, func_108__Fw_190_to_Beach_LaBreche, 0 + RandomHalf(40))
	AIparts:AddPeriodic("110. Landing_Quistreham", 40, func_110__Landing_Quistreham, 0 + RandomHalf(40))
	AIparts:AddPeriodic("111. Landing_Quistreham_Churchill", 40, func_111__Landing_Quistreham_Churchill, 0 + RandomHalf(40))
	AIparts:AddPeriodic("112. Landing_Quistreham", 40, func_112__Landing_Quistreham, 0 + RandomHalf(40))
	AIparts:AddPeriodic("113. Landing_Quistreham", 40, func_113__Landing_Quistreham, 0 + RandomHalf(40))
	AIparts:AddPeriodic("114. Landing_Quistreham", 40, func_114__Landing_Quistreham, 0 + RandomHalf(40))
	AIparts:AddPeriodic("115. Landing_Quistreham move to QuiBeach", 40, func_115__Landing_Quistreham_move_to_QuiBeach, 0 + RandomHalf(40))
	AIparts:AddPeriodic("120. Landing_LucsurMer", 40, func_120__Landing_LucsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("121. Landing_LucsurMer_ChuchillFT", 40, func_121__Landing_LucsurMer_ChuchillFT, 0 + RandomHalf(40))
	AIparts:AddPeriodic("122. Landing_LucsurMer", 40, func_122__Landing_LucsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("123. Landing_LucsurMer", 40, func_123__Landing_LucsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("124a. Landing_LucsurMer", 40, func_124a__Landing_LucsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("125. Landing_LucsurMer move to Vil_Luc", 40, func_125__Landing_LucsurMer_move_to_Vil_Luc, 0 + RandomHalf(40))
	AIparts:AddPeriodic("130. Landing_LionsurMer", 40, func_130__Landing_LionsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("131. Landing_LionsurMer_Centaur", 40, func_131__Landing_LionsurMer_Centaur, 0 + RandomHalf(40))
	AIparts:AddPeriodic("133. Landing_LionsurMer", 40, func_133__Landing_LionsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("132. Landing_LionsurMer", 40, func_132__Landing_LionsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("134. Landing_LionsurMer", 40, func_134__Landing_LionsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("135. Landing_LionsurMer move to Vil_Lion", 40, func_135__Landing_LionsurMer_move_to_Vil_Lion, 0 + RandomHalf(40))
	AIparts:AddPeriodic("129. ArtilleryStrike LionsurMer", 40, func_129__ArtilleryStrike_LionsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("136. Landing_LionsurMer move to Vil_Lion", 40, func_136__Landing_LionsurMer_move_to_Vil_Lion, 0 + RandomHalf(40))
	AIparts:AddPeriodic("109a. La Breche to Battery 716", 40, func_109a__La_Breche_to_Battery_716, 0 + RandomHalf(40))
	AIparts:AddPeriodic("025. Reinforcement 716 ID active", 40, func_025__Reinforcement_716_ID_active, 0 + RandomHalf(40))
	AIparts:AddPeriodic("109b. La Breche to Battery 716", 10, func_109b__La_Breche_to_Battery_716, 0 + RandomHalf(10))
	AIparts:AddPeriodic("126. LucsurMer to St_Aubin", 40, func_126__LucsurMer_to_St_Aubin, 0 + RandomHalf(40))
	AIparts:AddPeriodic("902.Special Landing_Franceville", 40, func_902_Special_Landing_Franceville, 0 + RandomHalf(40))
	AIparts:AddPeriodic("051. Arrival Ammunition train", 40, func_051__Arrival_Ammunition_train, 0 + RandomHalf(40))
	AIparts:AddPeriodic("052. Ammo train stop Caen", 40, func_052__Ammo_train_stop_Caen, 0 + RandomHalf(40))
	AIparts:AddPeriodic("053. Ammo train stop Villeneuve", 40, func_053__Ammo_train_stop_Villeneuve, 0 + RandomHalf(40))
	AIparts:AddPeriodic("060. Hermanville taken", 40, func_060__Hermanville_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("116. QuisBeach to Quis1", 10, func_116__QuisBeach_to_Quis1, 0 + RandomHalf(10))
	AIparts:AddPeriodic("137a. Lion-sur-Mer is taken", 40, func_137a__Lion_sur_Mer_is_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("140. Objective taken or not taken", 40, func_140__Objective_taken_or_not_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("137c. Arty LionsurMer", 40, func_137c__Arty_LionsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("143. Tank train stop Villeneuve", 40, func_143__Tank_train_stop_Villeneuve, 0 + RandomHalf(40))
	AIparts:AddPeriodic("127a. St Aubin taken_Ouistreham", 40, func_127a__St_Aubin_taken_Ouistreham, 0 + RandomHalf(40))
	AIparts:AddPeriodic("137b. Counterattack LionsurMer", 40, func_137b__Counterattack_LionsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("097. Airstrike Battery Merville", 40, func_097__Airstrike_Battery_Merville, 0 + RandomHalf(40))
	AIparts:AddPeriodic("650. 21500 Airstrike Caen", 40, func_650__21500_Airstrike_Caen, 0 + RandomHalf(40))
	AIparts:AddPeriodic("500.14400  Reinforcement 12SS PD", 40, func_500_14400__Reinforcement_12SS_PD, 0 + RandomHalf(40))
	AIparts:AddPeriodic("061. Douvres is taken", 40, func_061__Douvres_is_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("142. 3rd Canadian see enemy at Douvres", 40, func_142__3rd_Canadian_see_enemy_at_Douvres, 0 + RandomHalf(40))
	AIparts:AddPeriodic("000. Carpiquet airfield taken", 200, func_000__Carpiquet_airfield_taken, 100 + RandomHalf(100))
	AIparts:AddPeriodic("070. Carpiquet airfield taken", 40, func_070__Carpiquet_airfield_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("062. Colleville taken", 40, func_062__Colleville_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("138a. Arrival 27th Armoured", 40, func_138a__Arrival_27th_Armoured, 0 + RandomHalf(40))
	AIparts:AddPeriodic("138b. Retreat 27th Armoured", 40, func_138b__Retreat_27th_Armoured, 0 + RandomHalf(40))
	AIparts:AddPeriodic("139. 27th Armoured taken Periers Ridge", 40, func_139__27th_Armoured_taken_Periers_Ridge, 0 + RandomHalf(40))
	AIparts:AddPeriodic("501. Arrival BF Witt", 40, func_501__Arrival_BF_Witt, 0 + RandomHalf(40))
	AIparts:AddPeriodic("071. Pegasus Bridge taken", 40, func_071__Pegasus_Bridge_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("063. Ranville taken", 40, func_063__Ranville_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("072. Orne Bridge is taken", 40, func_072__Orne_Bridge_is_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("073. Merville Battery is taken", 40, func_073__Merville_Battery_is_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("010. 6th Airborne Paradrop W", 60, func_010__6th_Airborne_Paradrop_W, 0 + RandomHalf(60))
	AIparts:AddPeriodic("011a. 6th LZ_W attack Pegasus Bridge", 40, func_011a__6th_LZ_W_attack_Pegasus_Bridge, 0 + RandomHalf(40))
	AIparts:AddPeriodic("012. 6th LZ_N to LZ_N", 40, func_012__6th_LZ_N_to_LZ_N, 0 + RandomHalf(40))
	AIparts:AddPeriodic("013a. 6th LZ_V to Merville Battery", 40, func_013a__6th_LZ_V_to_Merville_Battery, 0 + RandomHalf(40))
	AIparts:AddPeriodic("014. 6th LZ_K to village Troarn", 40, func_014__6th_LZ_K_to_village_Troarn, 0 + RandomHalf(40))
	AIparts:AddPeriodic("064. Troarn taken", 40, func_064__Troarn_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("065. Bures taken", 40, func_065__Bures_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("010. 6th Airborne Paradrop K", 40, func_010__6th_Airborne_Paradrop_K, 0 + RandomHalf(40))
	AIparts:AddPeriodic("010. 6th Airborne Paradrop V", 40, func_010__6th_Airborne_Paradrop_V, 0 + RandomHalf(40))
	AIparts:AddPeriodic("010. 6th Airborne Paradrop X", 40, func_010__6th_Airborne_Paradrop_X, 0 + RandomHalf(40))
	AIparts:AddPeriodic("010. 6th Airborne Paradrop N", 40, func_010__6th_Airborne_Paradrop_N, 0 + RandomHalf(40))
	AIparts:AddPeriodic("010. 6th Airborne Paradrop Y", 40, func_010__6th_Airborne_Paradrop_Y, 0 + RandomHalf(40))
	AIparts:AddPeriodic("128a. Orne Canal to Defence coast", 40, func_128a__Orne_Canal_to_Defence_coast, 0 + RandomHalf(40))
	AIparts:AddPeriodic("128b. Orne Canal to Defence coast", 10, func_128b__Orne_Canal_to_Defence_coast, 0 + RandomHalf(10))
	AIparts:AddPeriodic("141a. 21pzr at Douvres", 40, func_141a__21pzr_at_Douvres, 0 + RandomHalf(40))
	AIparts:AddPeriodic("000. Counter of landing", 40, func_000__Counter_of_landing, 0 + RandomHalf(40))
	AIparts:AddPeriodic("127b. OuistrehamBeach to OuistrehamTown2", 40, func_127b__OuistrehamBeach_to_OuistrehamTown2, 0 + RandomHalf(40))
	AIparts:AddOneTime("000. Presets Mortars", 40, func_000__Presets_Mortars)
	AIparts:AddPeriodic("013b. 6th LZ_V to Merville Battery unload", 40, func_013b__6th_LZ_V_to_Merville_Battery_unload, 0 + RandomHalf(40))
	AIparts:AddPeriodic("150. Reinforcements 21.PD", 40, func_150__Reinforcements_21_PD, 0 + RandomHalf(40))
	AIparts:AddPeriodic("003b. Richter is dead", 50, func_003b__Richter_is_dead, 50 + RandomHalf(50))
	AIparts:AddPeriodic("900. special lighthouse", 40, func_900__special_lighthouse, 0 + RandomHalf(40))
	AIparts:AddPeriodic("127c. Ouistreham taken", 40, func_127c__Ouistreham_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("145a. Attack Franceville West", 40, func_145a__Attack_Franceville_West, 0 + RandomHalf(40))
	AIparts:AddPeriodic("145b. Attack Franceville East", 40, func_145b__Attack_Franceville_East, 0 + RandomHalf(40))
	AIparts:AddPeriodic("145c. Attack Franceville Village", 40, func_145c__Attack_Franceville_Village, 0 + RandomHalf(40))
	AIparts:AddPeriodic("146. Franceville taken", 40, func_146__Franceville_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("175a. 11700 Attack Herouvilette", 40, func_175a__11700_Attack_Herouvilette, 0 + RandomHalf(40))
	AIparts:AddPeriodic("066. Herouvillette taken", 40, func_066__Herouvillette_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("175b. 11700 Attack Herouvilette", 40, func_175b__11700_Attack_Herouvilette, 0 + RandomHalf(40))
	AIparts:AddPeriodic("160.10800 Attack Benouville and Lebisey", 40, func_160_10800_Attack_Benouville_and_Lebisey, 0 + RandomHalf(40))
	AIparts:AddPeriodic("067. Perriers sur le Dan is taken", 40, func_067__Perriers_sur_le_Dan_is_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("068. Benouville taken", 40, func_068__Benouville_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("000. Win or Loose", 40, func_000__Win_or_Loose, 0 + RandomHalf(40))
	AIparts:AddPeriodic("002b. Feuchtinger is dead", 50, func_002b__Feuchtinger_is_dead, 50 + RandomHalf(50))
	AIparts:AddPeriodic("001a. Meyer arrived", 40, func_001a__Meyer_arrived, 0 + RandomHalf(40))
	AIparts:AddPeriodic("001b. Meyer is dead", 50, func_001b__Meyer_is_dead, 50 + RandomHalf(50))
	AIparts:AddPeriodic("502. Arrival BF Meyer", 40, func_502__Arrival_BF_Meyer, 0 + RandomHalf(40))
	AIparts:AddOneTime("002a. Feuchtinger arrived", 40, func_002a__Feuchtinger_arrived)
	AIparts:AddOneTime("003a. Richter arrived", 40, func_003a__Richter_arrived)
	AIparts:AddPeriodic("176. 13200 Attack Collombelles", 40, func_176__13200_Attack_Collombelles, 0 + RandomHalf(40))
	AIparts:AddPeriodic("004. Luftflotte3", 40, func_004__Luftflotte3, 0 + RandomHalf(40))
	AIparts:AddPeriodic("013c. 6th LZ_V to Merville Battery ", 40, func_013c__6th_LZ_V_to_Merville_Battery_, 0 + RandomHalf(40))
	AIparts:AddPeriodic("011b. 6th LZ_W attack Pegasus Bridge", 40, func_011b__6th_LZ_W_attack_Pegasus_Bridge, 0 + RandomHalf(40))
	AIparts:AddPeriodic("030. Airplanes 45m", 40, func_030__Airplanes_45m, 0 + RandomHalf(40))
	AIparts:AddPeriodic("054. Passenger train", 40, func_054__Passenger_train, 0 + RandomHalf(40))
	AIparts:AddPeriodic("137d. Lion-sur-Mer is taken Event", 40, func_137d__Lion_sur_Mer_is_taken_Event, 0 + RandomHalf(40))
	AIparts:AddPeriodic("000. Warning 2 Generals are dead", 40, func_000__Warning_2_Generals_are_dead, 0 + RandomHalf(40))
	AIparts:AddPeriodic("015. 6th LZ_N attack Orne Bridge", 40, func_015__6th_LZ_N_attack_Orne_Bridge, 0 + RandomHalf(40))
	AIparts:AddPeriodic("016. 6th LZ_X attack Ranville", 40, func_016__6th_LZ_X_attack_Ranville, 0 + RandomHalf(40))
	AIparts:AddPeriodic("000. Camera", 40, func_000__Camera, 0 + RandomHalf(40))
	AIparts:AddPeriodic("177. 14100 Attack Canadian Division HQ716", 40, func_177__14100_Attack_Canadian_Division_HQ716, 0 + RandomHalf(40))
	AIparts:AddPeriodic("178. 14100 Attack Canadian Division Villeneuve", 40, func_178__14100_Attack_Canadian_Division_Villeneuve, 0 + RandomHalf(40))
	AIparts:AddPeriodic("179. 15000 Attack Canadian Division Villeneuve ", 40, func_179__15000_Attack_Canadian_Division_Villeneuve_, 0 + RandomHalf(40))
	AIparts:AddPeriodic("180. 15000 Attack Canadian Division Villeneuve", 40, func_180__15000_Attack_Canadian_Division_Villeneuve, 0 + RandomHalf(40))
	AIparts:AddPeriodic("182. 15900 Attack British Collombelles", 40, func_182__15900_Attack_British_Collombelles, 0 + RandomHalf(40))
	AIparts:AddPeriodic("185. 16800 Attack Canadian Division Carpiquet", 40, func_185__16800_Attack_Canadian_Division_Carpiquet, 0 + RandomHalf(40))
	AIparts:AddPeriodic("903. British Arty present", 40, func_903__British_Arty_present, 0 + RandomHalf(40))
	AIparts:AddPeriodic("904. British Arty present", 40, func_904__British_Arty_present, 0 + RandomHalf(40))
	AIparts:AddPeriodic("905. fortifications empty", 40, func_905__fortifications_empty, 0 + RandomHalf(40))
	AIparts:AddPeriodic("600. 17700 Attack Collombelles", 40, func_600__17700_Attack_Collombelles, 0 + RandomHalf(40))
	AIparts:AddPeriodic("601. 17900 Attack Collombelles", 40, func_601__17900_Attack_Collombelles, 0 + RandomHalf(40))
	AIparts:AddPeriodic("602a. 17900 Attack Collombelles Taken", 40, func_602a__17900_Attack_Collombelles_Taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("603. 18600 Attack Canadians Airfield", 40, func_603__18600_Attack_Canadians_Airfield, 0 + RandomHalf(40))
	AIparts:AddPeriodic("604. 18600 Canadians see enemy", 40, func_604__18600_Canadians_see_enemy, 0 + RandomHalf(40))
	AIparts:AddPeriodic("605a. 19200 Attack Canadians Airfield", 40, func_605a__19200_Attack_Canadians_Airfield, 0 + RandomHalf(40))
	AIparts:AddPeriodic("605b. 19200 Canadians see enemy", 40, func_605b__19200_Canadians_see_enemy, 0 + RandomHalf(40))
	AIparts:AddPeriodic("607. 19200 Airfield Carpiquet taken, to HQ21", 40, func_607__19200_Airfield_Carpiquet_taken__to_HQ21, 0 + RandomHalf(40))
	AIparts:AddPeriodic("651. 21600 Attack Caen", 40, func_651__21600_Attack_Caen, 0 + RandomHalf(40))
	AIparts:AddPeriodic("652. 21600 Attack Caen see enemy", 40, func_652__21600_Attack_Caen_see_enemy, 0 + RandomHalf(40))
	AIparts:AddPeriodic("653. 21600 Attack Caen HQ21", 40, func_653__21600_Attack_Caen_HQ21, 0 + RandomHalf(40))
	AIparts:AddPeriodic("654. 22100 Attack Caen retreat", 40, func_654__22100_Attack_Caen_retreat, 0 + RandomHalf(40))
	AIparts:AddPeriodic("700. Counterattack", 40, func_700__Counterattack, 0 + RandomHalf(40))
	AIparts:AddPeriodic("701. Obj. LZ_K taken", 40, func_701__Obj__LZ_K_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("702. Obj. Pegasus Bridge taken", 40, func_702__Obj__Pegasus_Bridge_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("703. Obj. Franceville taken", 40, func_703__Obj__Franceville_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("704. Obj. Ouistreham taken", 40, func_704__Obj__Ouistreham_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("705. Obj. Dourvres taken", 40, func_705__Obj__Dourvres_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("706. Obj. Lion-sur-Mer taken", 40, func_706__Obj__Lion_sur_Mer_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("606a. 20500 Attack Caen_East", 40, func_606a__20500_Attack_Caen_East, 0 + RandomHalf(40))
	AIparts:AddPeriodic("606b. 20500 Attack Caen_East", 40, func_606b__20500_Attack_Caen_East, 0 + RandomHalf(40))
	AIparts:AddPeriodic("606c. 20500 Attack Trainstation", 40, func_606c__20500_Attack_Trainstation, 0 + RandomHalf(40))
	AIparts:AddPeriodic("655. Franceville ", 40, func_655__Franceville_, 0 + RandomHalf(40))
	AIparts:AddPeriodic("656. Ouistreham", 40, func_656__Ouistreham, 0 + RandomHalf(40))
	AIparts:AddPeriodic("657. Pegasus", 40, func_657__Pegasus, 0 + RandomHalf(40))
	AIparts:AddOneTime("658. Pegasus redraw / counterattack", 40, func_658__Pegasus_redraw___counterattack)
	AIparts:AddPeriodic("707. 2nd reinforcement 16 feld", 40, func_707__2nd_reinforcement_16_feld, 0 + RandomHalf(40))
	AIparts:AddPeriodic("001c. Meyer is dead", 40, func_001c__Meyer_is_dead, 0 + RandomHalf(40))
	AIparts:AddPeriodic("002c. Feuchtinger is dead", 40, func_002c__Feuchtinger_is_dead, 0 + RandomHalf(40))
	AIparts:AddPeriodic("003c. Richter is dead", 40, func_003c__Richter_is_dead, 0 + RandomHalf(40))
	AIparts:AddPeriodic("003d. Richter is dead unload ", 40, func_003d__Richter_is_dead_unload_, 0 + RandomHalf(40))
	AIparts:AddPeriodic("002d. Feuchtinger is dead unload", 40, func_002d__Feuchtinger_is_dead_unload, 0 + RandomHalf(40))
	AIparts:AddPeriodic("001d. Meyer is dead unload", 40, func_001d__Meyer_is_dead_unload, 0 + RandomHalf(40))
	AIparts:AddPeriodic("124b. Landing_LucsurMer", 40, func_124b__Landing_LucsurMer, 0 + RandomHalf(40))
	AIparts:AddPeriodic("001e. Meyer not arrived", 40, func_001e__Meyer_not_arrived, 0 + RandomHalf(40))
	AIparts:AddPeriodic("000. A_Start", 40, func_000__A_Start, 0 + RandomHalf(40))
	AIparts:AddPeriodic("141b. 21pzr at Douvres", 40, func_141b__21pzr_at_Douvres, 0 + RandomHalf(40))
	AIparts:AddPeriodic("141c. 21pzr at Douvres ", 40, func_141c__21pzr_at_Douvres_, 0 + RandomHalf(40))
	AIparts:AddPeriodic("950. unload", 100, func_950__unload, 0 + RandomHalf(100))
	AIparts:AddPeriodic("074. Villeneuve taken", 40, func_074__Villeneuve_taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("183.15900 Attack Collombelles Taken", 40, func_183_15900_Attack_Collombelles_Taken, 0 + RandomHalf(40))
	AIparts:AddPeriodic("184. 15900 Attack HQ 21", 40, func_184__15900_Attack_HQ_21, 0 + RandomHalf(40))
	AIparts:AddPeriodic("602b. 17900 Attack HQ 21", 40, func_602b__17900_Attack_HQ_21, 0 + RandomHalf(40))
	AIparts:AddPeriodic("975. Pegasus Bridge", 40, func_975__Pegasus_Bridge, 0 + RandomHalf(40))
	msd_vars = {
		varEffect = 0,
		varFeuchtinger_ID = 0,
		varFeuchtingerAlive = true,
		varHealth = 100,
		varMeyer = 0,
		varMeyer_ID = 0,
		varMeyerAlive = true,
		varRichter_ID = 0,
		varRichterAlive = true,
	}
end

function func_050__Tiger_train()
	if IsEventPresent("EvTrain_Tiger") then
		RunSpawn("Player", {"German_train_Tiger", }, "", "", "", false, false, {{dislocation="End_of_track", }, {disappear=true, }, }, false, 50)
		mission.OutScreenMessage(100053, 5, "0xFF00CC00")
		AIparts:RemovePeriodic("050. Tiger train")
	end
end

function func_100__Landing_LaBreche()
	if GetGameTime() > 3605 then
		RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", }, "Landing_LaBreche", "Landingboats", "3rd_LaBreche", false, false, {{unload=true, }, {dislocation="Beach_LaBreche_Out", }, {disappear=true, }, }, false, 100)
		mission.OutScreenMessage(100011, 5, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  TransferUnits("Antitank", 0, "Antitank_1", 0) end)
		AIparts:RemovePeriodic("100. Landing_LaBreche")
	end
end

function func_107__Landing_LaBreche_move_to_LaBreche()
	if GetGameTime() > 3740 then
		MoveGroupToZone("3rd_LaBreche", "Village_La_Breche", false, false)
		AIparts:RemovePeriodic("107. Landing_LaBreche move to LaBreche")
	end
end

function func_103__Landing_LaBreche()
	if GetGameTime() > 3840 then
		RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", }, "Landing_LaBreche", "Landingboats", "3rd_LaBreche", false, false, {{unload=true, }, {dislocation="Beach_LaBreche_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LaBreche", "Village_La_Breche", false, false)
		AIparts:RemovePeriodic("103. Landing_LaBreche")
	end
end

function func_102__Landing_LaBreche()
	if GetGameTime() > 3780 then
		RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", }, "Landing_LaBreche", "Landingboats", "3rd_LaBreche", false, false, {{unload=true, }, {dislocation="Beach_LaBreche_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LaBreche", "Village_La_Breche", false, false)
		AIparts:RemovePeriodic("102. Landing_LaBreche")
	end
end

function func_104__Landing_LaBreche()
	if GetGameTime() > 3900 then
		RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", }, "Landing_LaBreche", "Landingboats", "3rd_LaBreche", false, false, {{unload=true, }, {dislocation="Beach_LaBreche_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LaBreche", "Village_La_Breche", false, false)
		AIparts:RemovePeriodic("104. Landing_LaBreche")
	end
end

function func_101__Landing_LaBreche_Firefly()
	if GetGameTime() > 3720 then
		RunSpawn("Enemy", {"British_lcm_Firefly_d", "British_lcm_Firefly_d", "British_lcm_Firefly_d", "British_lcm_Firefly_d", "British_lcm_Firefly_d", }, "Landing_LaBreche", "Landingboats", "3rd_LaBreche", false, false, {{unload=true, }, {dislocation="Beach_LaBreche_Out", }, {disappear=true, }, }, false, 100)
		AIparts:RemovePeriodic("101. Landing_LaBreche_Firefly")
	end
end

function func_099__ArtilleryStrike_LaBreche()
	if GetGameTime() > 3595 then
		Bombardment("Village_LaBreche", 30, 8, 6, 30)
		AIparts:RemovePeriodic("099. ArtilleryStrike LaBreche")
	end
end

function func_000__Presets()
	do
		groups.CreateTemplate("Patrol_Quistreham", groups.ttypes.patrol,
			{ call_for_help = false, call_for_howitzer = false, reinf_lost = 0,
			points = {"Beach_LaBreche","Beach_Quistreham", }, wait_time = {5,5, },
			spread_rad = 5, assault = true, group_move = true, circle = false })
		groups.CreateTemplate("Patrol_LaBreche", groups.ttypes.patrol,
			{ call_for_help = false, call_for_howitzer = false, reinf_lost = 0,
			points = {"Beach_LionsurMer","Beach_LaBreche", }, wait_time = {5,5, },
			spread_rad = 5, assault = true, group_move = true, circle = false })
		groups.CreateTemplate("Patrol_LionsurMer", groups.ttypes.patrol,
			{ call_for_help = false, call_for_howitzer = false, reinf_lost = 0,
			points = {"Beach_LucsurMer","Beach_LionsurMer", }, wait_time = {5,5, },
			spread_rad = 5, assault = true, group_move = true, circle = false })
		groups.CreateTemplate("Patrol_LucsurMer", groups.ttypes.patrol,
			{ call_for_help = false, call_for_howitzer = false, reinf_lost = 0,
			points = {"Beach_LucsurMer_2","Beach_LucsurMer", }, wait_time = {5,5, },
			spread_rad = 5, assault = true, group_move = true, circle = false })
		groups.AssignTemplate("Patrol_Quistreham", "Patrol_Quistreham")
		groups.AssignTemplate("Patrol_LaBreche", "Patrol_Labreche")
		groups.AssignTemplate("Patrol_LionsurMer", "Patrol_LionsurMer")
		groups.AssignTemplate("Patrol_LucsurMer", "Patrol_LucsurMer")
	end
end

function func_098__Airstrike_Coastline()
	if GetGameTime() > 3540 then
		 dofile("Missions/Single/Caen/para.lua") 
		SendPlane("Enemy", "Village_LaBreche", "extra", "NE", 5, -1, "")
		SendPlane("Enemy", "Beach_LionsurMer_2", "extra", "NE", 5, -1, "")
		SendPlane("Enemy", "Village_LaBreche_2", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Village_St_Aubin", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Village_Luc_Sur_Mer", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Village_Lion_Sur_Mer", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Town_Quistreham_1", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Town_Quistreham_2", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Town_Quistreham_3", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Town_Quistreham_4", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Town_Quistreham_5", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Village_St_Aubin_2", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Village_St_Aubin_3", "extra", "NE", 15, -1, "")
		SendPlane("Enemy", "Village_St_Aubin_4", "extra", "NE", 15, -1, "")
		mission.OutScreenMessage(100010, 5, "0xFFFF0000")
		AIparts:RemovePeriodic("098. Airstrike Coastline")
		mission.OutScreenMessage(100010, 5, "0xFFFF0000")
		AIparts:RemovePeriodic("098. Airstrike Coastline")
	end
end

function func_000__Presets_airplanes()
	do
		SetPlaneSide(1, "S")
		SetPlaneSide(2, "N")
		SetPlaneDesc("uk", "extra", "british/avro_683_lancaster.dsc")
		SetPlaneDesc("uk", "scout", "british/spitfire_mk_i.dsc")
		SetPlaneDesc("uk", "bomber", "british/tempest_mk_ii.dsc")
		SetPlaneDesc("uk", "fighter", "british/spitfire_mk_i.dsc")
		SetPlaneDesc("uk", "transport", "british/c_47.dsc")
		SetPlaneDesc("germany", "transport", "German/ju_52.dsc")
		SetPlaneDesc("germany", "scout", "German/fi_156_storch.dsc")
	end
end

function func_105__Landing_LaBreche_Sexton()
	if GetGameTime() > 3960 then
		RunSpawn("Enemy", {"British_lcm_Sexton", "British_lcm_Sexton", "British_lcm_Sexton", "British_lcm_Stuart", "British_lcm_Stuart", }, "Landing_LaBreche", "Landingboats", "3rd_LaBreche", false, false, {{unload=true, }, {dislocation="Beach_LaBreche_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LaBreche", "Village_La_Breche", false, false)
		AIparts:RemovePeriodic("105. Landing_LaBreche_Sexton")
	end
end

function func_106__Landing_LaBreche()
	if GetGameTime() > 4020 then
		RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", }, "Landing_LaBreche", "Landingboats", "3rd_LaBreche", false, false, {{unload=true, }, {dislocation="Beach_LaBreche_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LaBreche", "Village_La_Breche", false, false)
		AIparts:RemovePeriodic("106. Landing_LaBreche")
	end
end

function func_108__Fw_190_to_Beach_LaBreche()
	if NumPlayerUnitsInZone("Enemy", "Beach_LaBreche") > 5 then
		SendPlaneFromMap(1, "fighter", "Beach_LaBreche", 15)
		SendPlaneFromMap(1, "fighter", "Beach_LaBreche", 15)
		AIparts:RemovePeriodic("108. Fw-190 to Beach LaBreche")
	end
end

function func_110__Landing_Quistreham()
	if GetGameTime() > 4200 then
		RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_Quistreham", "Landingboats", "3rd_Quistreham", false, false, {{unload=true, }, {dislocation="Beach_Quistreham_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LaBreche", "Village_La_Breche", false, false)
		mission.OutScreenMessage(100012, 10, "0xFFFF0000")
		AIparts:RemovePeriodic("110. Landing_Quistreham")
	end
end

function func_111__Landing_Quistreham_Churchill()
	if GetGameTime() > 4260 then
		RunSpawn("Enemy", {"British_lcm_Churchill", "British_lcm_Churchill", "British_lcm_Churchill", "British_lcm_Churchill_FT", "British_lcm_Churchill_FT", }, "Landing_Quistreham", "Landingboats", "3rd_Quistreham", false, false, {{unload=true, }, {dislocation="Beach_Quistreham_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_Quistreham", "Beach_Quistreham_LZ", false, false)
		AIparts:RemovePeriodic("111. Landing_Quistreham_Churchill")
	end
end

function func_112__Landing_Quistreham()
	if GetGameTime() > 4320 then
		RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_Quistreham", "Landingboats", "3rd_Quistreham", false, false, {{unload=true, }, {dislocation="Beach_Quistreham_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_Quistreham", "Beach_Quistreham_LZ", false, false)
		AIparts:RemovePeriodic("112. Landing_Quistreham")
	end
end

function func_113__Landing_Quistreham()
	if GetGameTime() > 4380 then
		RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_Quistreham", "Landingboats", "3rd_Quistreham", false, false, {{unload=true, }, {dislocation="Beach_Quistreham_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_Quistreham", "Beach_Quistreham_LZ", false, false)
		AIparts:RemovePeriodic("113. Landing_Quistreham")
	end
end

function func_114__Landing_Quistreham()
	if GetGameTime() > 4440 then
		RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_Quistreham", "Landingboats", "3rd_Quistreham", false, false, {{unload=true, }, {dislocation="Beach_Quistreham_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_Quistreham", "Beach_Quistreham_LZ", false, false)
		AIparts:RemovePeriodic("114. Landing_Quistreham")
	end
end

function func_115__Landing_Quistreham_move_to_QuiBeach()
	if GetGameTime() > 4500 then
		MoveGroupToZone("3rd_Quistreham", "Beach_Quistreham_LZ", false, false)
		Bombardment("Town_Quistreham_4", 100, 12, 12, 30)
		Bombardment("Town_Quistreham_4", 100, 12, 12, 60)
		AIparts:RemovePeriodic("115. Landing_Quistreham move to QuiBeach")
	end
end

function func_120__Landing_LucsurMer()
	if GetGameTime() > 4800 then
		RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_LucsurMer", "Landingboats", "3rd_LucsurMer", false, false, {{unload=true, }, {dislocation="Beach_LucsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_Quistreham", "Beach_Quistreham_LZ", false, false)
		mission.OutScreenMessage(100013, 10, "0xFFFF0000")
		AIparts:RemovePeriodic("120. Landing_LucsurMer")
	end
end

function func_121__Landing_LucsurMer_ChuchillFT()
	if GetGameTime() > 4860 then
		RunSpawn("Enemy", {"British_lcm_Churchill_FT", "British_lcm_Stuart", "British_lcm_Sexton", "British_lcm_Sexton", "British_lcm_Churchill_FT", }, "Landing_LucsurMer", "Landingboats", "3rd_LucsurMer", false, false, {{unload=true, }, {dislocation="Beach_LucsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LucsurMer", "Village_LucsurMer", false, false)
		AIparts:RemovePeriodic("121. Landing_LucsurMer_ChuchillFT")
	end
end

function func_122__Landing_LucsurMer()
	if GetGameTime() > 4920 then
		RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_LucsurMer", "Landingboats", "3rd_LucsurMer", false, false, {{unload=true, }, {dislocation="Beach_LucsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LucsurMer", "Village_LucsurMer", false, false)
		AIparts:RemovePeriodic("122. Landing_LucsurMer")
	end
end

function func_123__Landing_LucsurMer()
	if GetGameTime() > 4980 then
		RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_LucsurMer", "Landingboats", "3rd_LucsurMer", false, false, {{unload=true, }, {dislocation="Beach_LucsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LucsurMer", "Village_LucsurMer", false, false)
		AIparts:RemovePeriodic("123. Landing_LucsurMer")
	end
end

function func_124a__Landing_LucsurMer()
	if GetGameTime() > 5040 then
		RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_LucsurMer", "Landingboats", "3rd_LucsurMer", false, false, {{unload=true, }, {dislocation="Beach_LucsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LucsurMer", "Village_LucsurMer", true, false)
		AIparts:RemovePeriodic("124a. Landing_LucsurMer")
	end
end

function func_125__Landing_LucsurMer_move_to_Vil_Luc()
	if GetGameTime() > 4880 then
		MoveGroupToZone("3rd_LucsurMer", "Village_LucsurMer", false, false)
		AIparts:RemovePeriodic("125. Landing_LucsurMer move to Vil_Luc")
	end
end

function func_130__Landing_LionsurMer()
	if GetGameTime() > 5400 then
		RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_LionsurMer", "Landingboats", "3rd_LionsurMer", false, false, {{unload=true, }, {dislocation="Beach_LionsurMer_Out", }, {disappear=true, }, }, false, 100)
		mission.OutScreenMessage(100014, 10, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  MoveGroupToZone("3rd_LionsurMer", "Village_LionsurMer", false, false) end)
		AIparts:RemovePeriodic("130. Landing_LionsurMer")
	end
end

function func_131__Landing_LionsurMer_Centaur()
	if GetGameTime() > 5460 then
		RunSpawn("Enemy", {"British_lcm_Centaur", "British_lcm_Centaur", "British_lcm_Centaur", "British_lcm_Churchill_FT", "British_lcm_Churchill_FT", }, "Landing_LionsurMer", "Landingboats", "3rd_LionsurMer", false, false, {{unload=true, }, {dislocation="Beach_LionsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LionsurMer", "Village_LionsurMer", false, false)
		AIparts:RemovePeriodic("131. Landing_LionsurMer_Centaur")
	end
end

function func_133__Landing_LionsurMer()
	if GetGameTime() > 5580 then
		RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", }, "Landing_LionsurMer", "Landingboats", "3rd_LionsurMer", false, false, {{unload=true, }, {dislocation="Beach_LionsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LionsurMer", "Village_LionsurMer", false, false)
		AIparts:RemovePeriodic("133. Landing_LionsurMer")
	end
end

function func_132__Landing_LionsurMer()
	if GetGameTime() > 5520 then
		RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", }, "Landing_LionsurMer", "Landingboats", "3rd_LionsurMer", false, false, {{unload=true, }, {dislocation="Beach_LionsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LionsurMer", "Village_LionsurMer", false, false)
		AIparts:RemovePeriodic("132. Landing_LionsurMer")
	end
end

function func_134__Landing_LionsurMer()
	if GetGameTime() > 5640 then
		RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", }, "Landing_LionsurMer", "Landingboats", "3rd_LionsurMer", false, false, {{unload=true, }, {dislocation="Beach_LionsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LionsurMer", "Village_LionsurMer", false, false)
		AIparts:RemovePeriodic("134. Landing_LionsurMer")
	end
end

function func_135__Landing_LionsurMer_move_to_Vil_Lion()
	if GetGameTime() > 5480 then
		MoveGroupToZone("3rd_LionsurMer", "Village_LionsurMer", false, false)
		AIparts:RemovePeriodic("135. Landing_LionsurMer move to Vil_Lion")
	end
end

function func_129__ArtilleryStrike_LionsurMer()
	if GetGameTime() > 5355 then
		Bombardment("Beach_LionsurMer_2", 30, 8, 6, 30)
		AIparts:RemovePeriodic("129. ArtilleryStrike LionsurMer")
	end
end

function func_136__Landing_LionsurMer_move_to_Vil_Lion()
	if GetGameTime() > 5720 then
		MoveGroupToZone("3rd_LionsurMer", "Village_LionsurMer", false, false)
		AIparts:RemovePeriodic("136. Landing_LionsurMer move to Vil_Lion")
	end
end

function func_109a__La_Breche_to_Battery_716()
	if NumPlayerUnitsInZone("Player", "Village_La_Breche") < 2 and NumPlayerUnitsInZone("Enemy", "Village_La_Breche") > 10 then
		RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", }, "Landing_LaBreche", "Landingboats", "3rd_LaBreche", false, false, {{unload=true, }, {dislocation="Beach_LaBreche_Out", }, {disappear=true, }, }, false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  MoveGroupToZone("3rd_LaBreche", "Village_Hermanville", false, false) end)
		mission.OutScreenMessage(100015, 10, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 180*10, function()  RunSpawn("Enemy", {"British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_lcvp", "British_Churchill_FT", }, "Landing_LaBreche", "Landingboats", "3rd_Colleville", false, false, {{unload=true, }, {dislocation="Beach_LaBreche_Out", }, {disappear=true, }, }, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  MoveGroupToZone("3rd_Colleville", "Battery_716", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 480*10, function()  MoveGroupToZone("3rd_Colleville", "Village_Colleville", false, false) end)
		AIparts:RemovePeriodic("109a. La Breche to Battery 716")
	end
end

function func_025__Reinforcement_716_ID_active()
	if GetGameTime() > 1800 then
		TransferUnits("716_ID", 0, "716_Reserve", 0)
		mission.OutScreenMessage(100009, 5, "0xFF00CC00")
		AIparts:RemovePeriodic("025. Reinforcement 716 ID active")
	end
end

function func_109b__La_Breche_to_Battery_716()
	if NumPlayerUnitsInZone("Player", "Battery_716") < 1 and NumPlayerUnitsInZone("Enemy", "Battery_716") > 10 then
		MoveGroupToZone("3rd_LaBreche", "Village_Hermanville", false, false)
		AIparts:RemovePeriodic("109b. La Breche to Battery 716")
	end
end

function func_126__LucsurMer_to_St_Aubin()
	if NumPlayerUnitsInZone("Player", "Village_LucsurMer") < 2 and NumPlayerUnitsInZone("Enemy", "Village_LucsurMer") > 10 then
		Bombardment("Beach_St_Aubin", 5, 8, 6, 30)
		Bombardment("Village_St_Aubin", 20, 8, 6, 60)
		Bombardment("Village_St_Aubin_2", 20, 8, 6, 90)
		Bombardment("Village_St_Aubin_3", 20, 8, 6, 120)
		Bombardment("Village_St_Aubin_4", 20, 8, 6, 150)
		RunSpawn("Enemy", {"British_lcm_Churchill_FT", "British_lcm_Sexton", "British_lcm_Centaur", "British_lcm_Churchill_FT", "British_lcm_Churchill_FT", }, "Landing_LucsurMer", "Landingboats", "3rd_LucsurMer", false, false, {{unload=true, }, {dislocation="Beach_LucsurMer_Out", }, {disappear=true, }, }, false, 100)
		MoveGroupToZone("3rd_LucsurMer", "Village_St_Aubin", false, false)
		mission.OutScreenMessage(100018, 10, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  MoveGroupToZone("3rd_LucsurMer", "Village_St_Aubin", false, false) end)
		AIparts:RemovePeriodic("126. LucsurMer to St_Aubin")
	end
end

function func_902_Special_Landing_Franceville()
	if GetGameTime() < 3600 and NumPlayerUnitsInZone("Player", "Beach_Franceville_West") < 20 then
		SendPlane("Enemy", "Village_Franceville", "scout", "N", 15, -1, "")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  mission.OutScreenMessage(100092, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_Franceville", "Landingboats", "3rd_Franceville", false, false, {{unload=true, }, {dislocation="Beach_Franceville_Out", }, {disappear=true, }, }, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  MoveGroupToZone("3rd_Franceville", "Village_Franceville", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 130*10, function()  RunSpawn("Enemy", {"British_lcm_Churchill_FT", "British_lcm_Churchill_FT", "British_lcm_Churchill_FT", "British_lcm_Stuart", "British_lcm_Stuart", }, "Landing_Franceville", "Landingboats", "3rd_Franceville", false, false, {{unload=true, }, {dislocation="Beach_Franceville_Out", }, {disappear=true, }, }, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 220*10, function()  MoveGroupToZone("3rd_Franceville", "Village_Franceville", false, false) end)
		AIparts:RemovePeriodic("902.Special Landing_Franceville")
	end
	if GetGameTime() < 3600 and NumPlayerUnitsInZone("Player", "Beach_Franceville_East") < 20 then
		SendPlane("Enemy", "Beach_Franceville", "scout", "N", 15, -1, "")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  mission.OutScreenMessage(100092, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", "British_lcvp_SSB", }, "Landing_Franceville", "Landingboats", "3rd_Franceville", false, false, {{unload=true, }, {dislocation="Beach_Franceville_Out", }, {disappear=true, }, }, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  MoveGroupToZone("3rd_Franceville", "Village_Franceville", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 130*10, function()  RunSpawn("Enemy", {"British_lcm_Churchill_FT", "British_lcm_Churchill_FT", "British_lcm_Churchill_FT", "British_lcm_Stuart", "British_lcm_Stuart", }, "Landing_Franceville", "Landingboats", "3rd_Franceville", false, false, {{unload=true, }, {dislocation="Beach_Franceville_Out", }, {disappear=true, }, }, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  MoveGroupToZone("3rd_Franceville", "Village_Franceville", false, false) end)
		AIparts:RemovePeriodic("902.Special Landing_Franceville")
	end
end

function func_051__Arrival_Ammunition_train()
	if IsEventPresent("EvTrain_Ammo") then
		RunSpawn("Player", {"German_train_Ammo", }, "Train", "German_Ammo_Train", "German_Ammo_Train", false, false, {{dislocation="Caen_Trainstation", }, }, false, 50)
		mission.OutScreenMessage(100053, 5, "0xFF00CC00")
		AIparts:RemovePeriodic("051. Arrival Ammunition train")
	end
end

function func_052__Ammo_train_stop_Caen()
	if NumPlayerUnitsInZoneByType("Player", "Caen_Trainstation", 22) > 0 and IsEventPresent("EvTrain_Ammo") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  SpawnAmmoFuel("ammo_8000.dsc", {"Trainstation_Ammo1", }, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 26*10, function()  SpawnAmmoFuel("ammo_8000.dsc", {"Trainstation_Ammo2", }, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 27*10, function()  SpawnAmmoFuel("ammo_8000.dsc", {"Trainstation_Ammo3", }, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 28*10, function()  SpawnAmmoFuel("ammo_8000.dsc", {"Trainstation_Ammo4", }, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  mission.OutScreenMessage(100094, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  MoveGroupTo("German_Ammo_Train", {"Caen_Trainstation", }, {"Trainstation_Villeneuve", }, {}, false, false, "", false, 1) end)
		AIparts:RemovePeriodic("052. Ammo train stop Caen")
	end
end

function func_053__Ammo_train_stop_Villeneuve()
	if NumPlayerUnitsInZoneByType("Player", "Village_Villeneuve_Trainstation", 22) > 0 and IsEventPresent("EvTrain_Ammo") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  SpawnAmmoFuel("ammo_8000.dsc", {"Trainstation_Villeneuve_1", }, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 26*10, function()  SpawnAmmoFuel("ammo_8000.dsc", {"Trainstation_Villeneuve_2", }, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  mission.OutScreenMessage(100093, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  MoveGroupTo("German_Ammo_Train", {"Trainstation_Villeneuve", }, {"End_of_track", }, {}, false, false, "", true, 1) end)
		AIparts:RemovePeriodic("053. Ammo train stop Villeneuve")
	end
end

function func_060__Hermanville_taken()
	if NumPlayerUnitsInZone("Player", "Village_Hermanville") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Hermanville") > 0 then
		mission.OutScreenMessage(100016, 5, "0xFFFF0000")
		AIparts:RemovePeriodic("060. Hermanville taken")
	end
end

function func_116__QuisBeach_to_Quis1()
	if NumPlayerUnitsInZone("Player", "Beach_Quistreham_LZ") < 2 and NumPlayerUnitsInZone("Enemy", "Beach_Quistreham_LZ") > 10 then
		MoveGroupToZone("3rd_Quistreham", "Town_Quistreham_1", false, false)
		mission.OutScreenMessage(100017, 5, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  RunSpawn("Enemy", {"British_lcm_Achilles", "British_lcm_Achilles", "British_lcm_Sexton", "British_Cromwell", "British_Cromwell", }, "Landing_Quistreham", "Landingboats", "3rd_Quistreham", false, false, {{unload=true, }, {dislocation="Beach_Quistreham_Out", }, {disappear=true, }, }, false, 100) end)
		AIparts:RemovePeriodic("116. QuisBeach to Quis1")
	end
end

function func_137a__Lion_sur_Mer_is_taken()
	if NumPlayerUnitsInZone("Player", "Village_LionsurMer") < 1 and NumPlayerUnitsInZone("Enemy", "Village_LionsurMer") > 0 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"LionsurMer1", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"LionsurMer2", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"LionsurMer3", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 4*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"LionsurMer4", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"LionsurMer5", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  RunSpawn("Enemy", {"British_lcm_Achilles", "British_lcm_Achilles", "British_lcm_Achilles", "British_lcm_Achilles", "British_lcm_Achilles", }, "Landing_LionsurMer", "Landingboats", "3rd_LionsurMer", false, false, {{unload=true, }, {dislocation="Beach_LionsurMer_Out", }, {disappear=true, }, }, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"British_lcm_Achilles", "British_lcm_Achilles", "British_lcm_Achilles", "British_lcm_Achilles", "British_lcm_Achilles", }, "Landing_LionsurMer", "Landingboats", "3rd_LionsurMer", false, false, {{unload=true, }, {dislocation="Beach_LionsurMer_Out", }, {disappear=true, }, }, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  mission.OutScreenMessage(100020, 15, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 61*10, function()  AcivateObjective("Lion-sur-Mer") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 62*10, function()  AcivateObjective("Lion-sur-Mer_Timer") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 63*10, function()  ProceedObjective("Lion-sur-Mer_Timer", "Player") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 64*10, function()  TransferUnits("PZG_192", 0, "21_Pzr_repair", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  UpdateGroupCounters("21_Pzr_repair") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  MoveGroupToZone("3rd_LionsurMer", "Village_LionsurMer", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 900*10, function()  SendPlane("Enemy", "Carpiquet_Airfield", "fighter", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 901*10, function()  SendPlane("Enemy", "Carpiquet_Airfield", "fighter", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1800*10, function()  SetEvent("EvTrain_Tiger") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2500*10, function()  SendPlaneFromMap(1, "fighter", "Beach_LaBreche", 15) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2501*10, function()  SendPlane("Enemy", "Carpiquet_Airfield", "fighter", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2635*10, function()  SetEvent("EvVillageLionSurMer") end)
		AIparts:RemovePeriodic("137a. Lion-sur-Mer is taken")
	end
end

function func_140__Objective_taken_or_not_taken()
	if IsObjectiveFailed("Lion-sur-Mer", "Player") and NumGroupUnits("21_Pzr_repair", 16, true, false, true) < 8 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100023, 20, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 125*10, function()  mission.OutScreenMessage(100039, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 126*10, function()  AcivateObjective("Douvres_La_Delivrance") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 127*10, function()  RunSpawn("Player", {"German_train_Tanks", }, "Train", "German_Ammo_Tanks", "German_Ammo_Tanks", false, false, {{dislocation="Trainstation_Villeneuve", }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Douvres", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 180*10, function()  RunSpawn("Enemy", {"Canadian_ChurchillFT", "Canadian_ChurchillFT", "Canadian_ChurchillFT", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 190*10, function()  RunSpawn("Enemy", {"Canadian_Bren", "Canadian_Bren", "Canadian_Bren", "Canadian_Jeep", "Canadian_Jeep", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 220*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Douvres", true, false) end)
		AIparts:RemovePeriodic("140. Objective taken or not taken")
	end
	if IsObjectiveFailed("Lion-sur-Mer", "Player") and NumGroupUnits("21_Pzr_repair", 16, true, false, true) > 8 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100100, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 125*10, function()  mission.OutScreenMessage(100039, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 126*10, function()  AcivateObjective("Douvres_La_Delivrance") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Douvres", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 180*10, function()  RunSpawn("Enemy", {"Canadian_ChurchillFT", "Canadian_ChurchillFT", "Canadian_ChurchillFT", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 190*10, function()  RunSpawn("Enemy", {"Canadian_Bren", "Canadian_Bren", "Canadian_Bren", "Canadian_Jeep", "Canadian_Jeep", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 220*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Douvres", true, false) end)
		AIparts:RemovePeriodic("140. Objective taken or not taken")
	end
	if IsObjectiveCompleted("Lion-sur-Mer", "Player") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100024, 20, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3600*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3725*10, function()  mission.OutScreenMessage(100040, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3726*10, function()  AcivateObjective("Douvres_La_Delivrance") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3727*10, function()  RunSpawn("Player", {"German_train_Tanks", }, "Train", "German_Ammo_Tanks", "German_Ammo_Tanks", false, false, {{dislocation="Trainstation_Villeneuve", }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3750*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Douvres", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3780*10, function()  RunSpawn("Enemy", {"Canadian_ChurchillFT", "Canadian_ChurchillFT", "Canadian_ChurchillFT", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3790*10, function()  RunSpawn("Enemy", {"Canadian_Bren", "Canadian_Bren", "Canadian_Bren", "Canadian_Jeep", "Canadian_Jeep", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 38220*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Douvres", true, false) end)
		AIparts:RemovePeriodic("140. Objective taken or not taken")
	end
end

function func_137c__Arty_LionsurMer()
	if NumGroupUnitsInZone("21_Pzr_repair", "Village_LionsurMer_peri") > 2 and IsObjectiveActive("Lion-sur-Mer") and GetGameTime() < 9000 then
		Bombardment("LionsurMer_1", 30, 8, 6, 30)
		Bombardment("LionsurMer_2", 30, 8, 6, 90)
		Bombardment("LionsurMer_3", 30, 8, 6, 150)
		Bombardment("LionsurMer_4", 30, 8, 6, 180)
		AIparts:UpdatePeriodic("137c. Arty LionsurMer", 1200)
	end
end

function func_143__Tank_train_stop_Villeneuve()
	if NumPlayerUnitsInZoneByType("Player", "Village_Villeneuve_Trainstation", 22) > 0 and IsObjectiveActive("Douvres_La_Delivrance") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  SpawnUnit("Units/Europe/Vehicles/Tanks/german/pzkpfw_iv_ausf_g_camo02.dsc", "Player", {"Trainstation_Villeneuve_1", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 26*10, function()  SpawnUnit("Units/Europe/Vehicles/Tanks/german/pzkpfw_iv_ausf_g_camo02.dsc", "Player", {"Trainstation_Villeneuve_2", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 27*10, function()  SpawnUnit("Units/Europe/Vehicles/Tanks/german/pzkpfw_iv_ausf_g_camo02.dsc", "Player", {"Trainstation_Villeneuve_3", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 28*10, function()  SpawnUnit("Units/Europe/Vehicles/Tanks/german/pzkpfw_iv_ausf_g_camo02.dsc", "Player", {"Trainstation_Villeneuve_4", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 29*10, function()  SpawnUnit("Units/Europe/Vehicles/Tanks/german/pzkpfw_iv_ausf_g_camo02.dsc", "Player", {"Trainstation_Villeneuve_5", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  mission.OutScreenMessage(100095, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  MoveGroupTo("German_Ammo_Tanks", {"Trainstation_Villeneuve", }, {"End_of_track", }, {}, false, false, "", true, 1) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  SetEvent("EvTrain_Ammo") end)
		AIparts:RemovePeriodic("143. Tank train stop Villeneuve")
	end
end

function func_127a__St_Aubin_taken_Ouistreham()
	if NumPlayerUnitsInZone("Player", "Village_St_Aubin") < 1 and NumPlayerUnitsInZone("Enemy", "Village_St_Aubin") > 0 then
		mission.OutScreenMessage(100022, 5, "0xFFFF0000")
		TransferUnits("3rd_LucsurMer", 0, "3rd_Quistreham", 0)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  MoveGroupToZone("3rd_Quistreham", "Town_Quistreham_1", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 615*10, function()  MoveGroupToZone("3rd_Quistreham", "Beach_Quistreham_1", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1200*10, function()  MoveGroupToZone("3rd_Quistreham", "Beach_Quistreham_2", false, false) end)
		AIparts:RemovePeriodic("127a. St Aubin taken_Ouistreham")
	end
end

function func_137b__Counterattack_LionsurMer()
	if NumGroupUnitsInZone("21_Pzr_repair", "Village_LionsurMer_peri") > 0 then
		RunSpawn("Enemy", {"British_lcm_Firefly_d", "British_lcm_Firefly_d", "British_lcm_Firefly_d", "British_lcm_Firefly_d", "British_lcm_Firefly_d", }, "Landing_LionsurMer", "Landingboats", "3rd_Firefly", false, false, {{unload=true, }, {dislocation="Beach_LionsurMer_Out", }, {disappear=true, }, }, false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Enemy", {"British_lcm_Firefly_d", "British_lcm_Firefly_d", "British_lcm_Firefly_d", "British_lcm_Firefly_d", "British_lcm_Firefly_d", }, "Landing_LionsurMer", "Landingboats", "3rd_Firefly", false, false, {{unload=true, }, {dislocation="Beach_LionsurMer_Out", }, {disappear=true, }, }, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  MoveGroupToZone("3rd_Firefly", "Village_LionsurMer_peri", false, false) end)
		AIparts:RemovePeriodic("137b. Counterattack LionsurMer")
	end
end

function func_097__Airstrike_Battery_Merville()
	if GetGameTime() > 120 then
		SendPlane("Enemy", "Bat_Merville_1", "extra", "N", 5, -1, "")
		SendPlane("Enemy", "Bat_Merville_2", "extra", "N", 5, -1, "")
		SendPlane("Enemy", "Bat_Merville_3", "extra", "N", 5, -1, "")
		SendPlane("Enemy", "Bat_Merville_4", "extra", "N", 5, -1, "")
		SendPlane("Enemy", "Bat_Merville_5", "extra", "N", 5, -1, "")
		mission.OutScreenMessage(100010, 5, "0xFFFF0000")
		AIparts:RemovePeriodic("097. Airstrike Battery Merville")
	end
end

function func_650__21500_Airstrike_Caen()
	if GetGameTime() > 21500 then
		SendPlane("Enemy", "Caen_Airstrike_1", "extra", "N", 25, -1, "")
		SendPlane("Enemy", "Caen_Airstrike_1", "extra", "N", 25, -1, "")
		SendPlane("Enemy", "Caen_Airstrike_2", "extra", "N", 25, -1, "")
		SendPlane("Enemy", "Caen_Airstrike_2", "extra", "N", 25, -1, "")
		mission.OutScreenMessage(100010, 5, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  SendPlane("Enemy", "Caen_Airstrike_3", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  SendPlane("Enemy", "Caen_Airstrike_3", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  SendPlane("Enemy", "Caen_Airstrike_4", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  SendPlane("Enemy", "Caen_Airstrike_4", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  SendPlane("Enemy", "Caen_Airstrike_5", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  SendPlane("Enemy", "Caen_Airstrike_5", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  SendPlane("Enemy", "Caen_Airstrike_6", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  SendPlane("Enemy", "Caen_Airstrike_6", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SendPlane("Enemy", "Caen_Airstrike_7", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SendPlane("Enemy", "Caen_Airstrike_7", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SendPlane("Enemy", "Caen_Airstrike_8", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SendPlane("Enemy", "Caen_Airstrike_9", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SendPlane("Enemy", "Caen_Airstrike_0", "extra", "N", 25, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  mission.OutScreenMessage(100064, 15, "0xFFFF0000") end)
		AIparts:RemovePeriodic("650. 21500 Airstrike Caen")
	end
end

function func_500_14400__Reinforcement_12SS_PD()
	if GetGameTime() > 14400 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100081, 15, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"German_SS_Kubelwagen", }, "To_Villeneuve", "12_SS", "Officer_Witt", false, false, {{unload_to="HQ_12SS", }, }, false, 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  RunSpawn("Player", {"German_SS_Motor1", "German_SS_Motor1", "German_SS_2501", }, "To_Villeneuve_B", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 125*10, function()  mission.OutScreenMessage(100080, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 130*10, function()  RunSpawn("Player", {"German_SS_2501", "German_SS_2501", "German_SS_2501", }, "To_Villeneuve_B", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  RunSpawn("Player", {"German_SS_Truck_105mm1", "German_SS_Truck_105mm1", "German_SS_Truck_105mm1", }, "To_Villeneuve", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 365*10, function()  mission.OutScreenMessage(100079, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 380*10, function()  RunSpawn("Player", {"German_SS_Hummel1", "German_SS_Hummel1", "German_SS_Hummel1", "German_SS_Wespe1", "German_SS_Wespe1", "German_SS_Wespe1", }, "To_Villeneuve", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 720*10, function()  RunSpawn("Player", {"German_SS_251_Pak1", "German_SS_251_Pak1", "German_SS_251_Pak1", "German_SS_251_Pak1", "German_SS_251_Pak1", }, "Caen_South", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 725*10, function()  mission.OutScreenMessage(100078, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 740*10, function()  RunSpawn("Player", {"German_SS_PanzerIV1", "German_SS_PanzerIV1", "German_SS_PanzerIV1", "German_SS_PanzerIV1", }, "Caen_South", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 750*10, function()  RunSpawn("Player", {"German_SS_Panther1", "German_SS_Panther1", "German_SS_Panther1", "German_SS_Panther1", "German_SS_Panther1", "German_SS_PanzerIV1", "German_SS_Panther1", "German_SS_Panther1", }, "Caen_South", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1080*10, function()  RunSpawn("Player", {"German_SS_Truck_88mm1", "German_SS_Truck_88mm1", "German_SS_Truck_88mm1", }, "To_Villeneuve_B", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1085*10, function()  mission.OutScreenMessage(100077, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1100*10, function()  RunSpawn("Player", {"German_SS_Mobelwagen1", "German_SS_Mobelwagen1", "German_SS_Mobelwagen1", }, "To_Villeneuve_B", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1440*10, function()  RunSpawn("Player", {"German_SS_Jagdpanzer1", "German_SS_Jagdpanzer1", "German_SS_Jagdpanzer1", "German_SS_Jagdpanzer1", }, "To_Villeneuve", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1445*10, function()  mission.OutScreenMessage(100076, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1460*10, function()  RunSpawn("Player", {"German_SS_Jagdpanzer1", "German_SS_Jagdpanzer1", "German_SS_Jagdpanzer1", "German_SS_Jagdpanzer1", }, "To_Villeneuve", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1800*10, function()  RunSpawn("Player", {"German_SS_Munition1", "German_SS_Munition1", "German_SS_Fuel1", "German_SS_Fuel1", }, "To_Villeneuve_B", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1805*10, function()  mission.OutScreenMessage(100075, 15, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1820*10, function()  UpdateGroupCounters("12_SS") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2160*10, function()  RunSpawn("Player", {"German_SS_2511", "German_SS_2511", "German_SS_2511", "German_SS_2511", }, "Airfield_SS", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2165*10, function()  mission.OutScreenMessage(100099, 15, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2205*10, function()  SetEvent("EvLuftflotte3") end)
		AIparts:RemovePeriodic("500.14400  Reinforcement 12SS PD")
	end
end

function func_061__Douvres_is_taken()
	if NumPlayerUnitsInZone("Player", "Village_Douvres") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Douvres") > 0 then
		mission.OutScreenMessage(100025, 5, "0xFFFF0000")
		SetObjectiveComplete("Douvres_La_Delivrance", "Enemy")
		AIparts:RemovePeriodic("061. Douvres is taken")
	end
end

function func_142__3rd_Canadian_see_enemy_at_Douvres()
	if IsObjectiveActive("Douvres_La_Delivrance") and GroupSeeEnemyNow("Canadian_3rd") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  UnloadTransports("Canadian_3rd") end)
		AIparts:RemovePeriodic("142. 3rd Canadian see enemy at Douvres")
	end
end

function func_000__Carpiquet_airfield_taken()
	if NumGroupUnits("Carpiquet_Player", 0, false, false, false) > 0 and NumPlayerUnitsInZone("Player", "Airfield_Carpiquet") < 2 then
		TransferUnits("Carpiquet_Player", 0, "Carpiquet_Enemy", 0)
		UpdateGroupCounters("Carpiquet_Enemy")
	end
	if NumGroupUnits("Carpiquet_Enemy", 0, false, false, false) > 0 and NumPlayerUnitsInZone("Player", "Airfield_Carpiquet") > 2 then
		TransferUnits("Carpiquet_Enemy", 0, "Carpiquet_Player", 0)
		UpdateGroupCounters("Carpiquet_Player")
	end
end

function func_070__Carpiquet_airfield_taken()
	if NumPlayerUnitsInZone("Player", "Airfield_Carpiquet") < 1 and NumPlayerUnitsInZone("Enemy", "Airfield_Carpiquet") > 0 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100102, 5, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  MoveGroupToZone("Canadian_3rd", "HQ_21", true, false) end)
		AIparts:RemovePeriodic("070. Carpiquet airfield taken")
	end
end

function func_062__Colleville_taken()
	if NumPlayerUnitsInZone("Player", "Village_Colleville") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Colleville") > 0 then
		mission.OutScreenMessage(100026, 5, "0xFFFF0000")
		AIparts:RemovePeriodic("062. Colleville taken")
	end
end

function func_138a__Arrival_27th_Armoured()
	if NumPlayerUnitsInZone("Enemy", "Village_Hermanville") > 0 and NumPlayerUnitsInZone("Enemy", "Village_Colleville") > 0 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  RunSpawn("Enemy", {"British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", }, "Spawn_Hermanville", "27th_Armoured", "27th_Armoured", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 380*10, function()  RunSpawn("Enemy", {"British_Stuart", "British_Stuart", "British_Bren", "British_Bren", "British_Bren", }, "Spawn_Hermanville", "27th_Armoured", "27th_Armoured", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 385*10, function()  mission.OutScreenMessage(100027, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 390*10, function()  UpdateGroupCounters("27th_Armoured") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 395*10, function()  MoveGroupToZone("27th_Armoured", "Periers_Ridge", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 397*10, function()  AcivateObjective("Periers_Ridge") end)
		AIparts:RemovePeriodic("138a. Arrival 27th Armoured")
	end
end

function func_138b__Retreat_27th_Armoured()
	if IsObjectiveActive("Periers_Ridge") and NumGroupUnits("27th_Armoured", 16, false, false, true) < 40 then
		MoveGroupToZone("27th_Armoured", "Village_Colleville", false, false)
		mission.OutScreenMessage(100028, 10, "0xFF00CC00")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  TransferUnits("27th_Armoured", 0, "3rd_Colleville", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  mission.OutScreenMessage(100030, 5, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 152*10, function()  SendPlane("Enemy", "Perrier-Ridge_1", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 153*10, function()  SendPlane("Enemy", "Perrier-Ridge_1", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 154*10, function()  SendPlane("Enemy", "Perrier-Ridge_2", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 155*10, function()  SendPlane("Enemy", "Perrier-Ridge_2", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 156*10, function()  SendPlane("Enemy", "Perrier-Ridge_3", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 157*10, function()  SendPlane("Enemy", "Perrier-Ridge_3", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  RunSpawn("Enemy", {"British_Firefly", "British_Firefly", "British_Firefly", "British_Firefly", "British_Firefly", }, "Spawn_Hermanville", "27th_Armoured", "27th_Armoured", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 400*10, function()  RunSpawn("Enemy", {"British_Cromwell", "British_Cromwell", "British_Daimler", "British_Daimler", "British_Daimler", }, "Spawn_Hermanville", "27th_Armoured", "27th_Armoured", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 420*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Sexton", "British_Sexton", }, "Spawn_Hermanville", "27th_Armoured", "27th_Armoured", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 460*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Sexton", "British_Sexton", }, "Spawn_Hermanville", "27th_Armoured", "27th_Armoured", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 520*10, function()  MoveGroupToZone("27th_Armoured", "Periers_Ridge", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 540*10, function()  UnloadTransports("27th_Armoured") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 560*10, function()  MoveGroupToZone("27th_Armoured", "Periers_Ridge", true, false) end)
		AIparts:RemovePeriodic("138b. Retreat 27th Armoured")
	end
end

function func_139__27th_Armoured_taken_Periers_Ridge()
	if NumPlayerUnitsInZone("Player", "Periers_Ridge") < 1 and NumPlayerUnitsInZone("Enemy", "Periers_Ridge") > 0 then
		mission.OutScreenMessage(100029, 5, "0xFFFF0000")
		SetObjectiveComplete("Periers_Ridge", "Enemy")
		SetGroupBehaviour("27th_Armoured", nil, true, nil, nil, nil, true, true, nil, nil, nil)
		AIparts:RemovePeriodic("139. 27th Armoured taken Periers Ridge")
	end
end

function func_501__Arrival_BF_Witt()
	if NumGroupUnitsNearPoint("Officer_Witt", 0, "HQ_12SS", 1) > 0 or NumGroupUnitsInZone("Officer_Witt", "HQ_12SS") > 0 then
		UpdateGroupCounters("Officer_Witt")
		GroupSetMicroAIBehaviour("Officer_Witt", "Agressive")
		mission.CameraLock(true)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1*10, function()  SetGroupSelectable("Officer_Witt", false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  mission.CameraAt({-467.034180, 3.065537, -828.759338}, 42.363266, 91.614922, 48.464172, 5.00) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 7*10, function()  mission.OutScreenMessage(100084, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 17*10, function()  mission.CameraLock(false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3600*10, function()  Bombardment("HQ_12SS", 5, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3604*10, function()  mission.OutScreenMessage(100083, 15, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3660*10, function()  RunSpawn("Player", {"German_SS_Kubelwagen_Meyer1", }, "To_Villeneuve", "12_SSA", "Officer_Meyer", false, false, {{unload_to="HQ_12SS", }, }, false, 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 3675*10, function()  MoveGroupToZone("12_SSA", "HQ_12SS", false, false) end)
		AIparts:RemovePeriodic("501. Arrival BF Witt")
	end
end

function func_071__Pegasus_Bridge_taken()
	if NumPlayerUnitsInZone("Player", "Bridge_Pegasus") < 1 and NumPlayerUnitsInZone("Enemy", "Bridge_Pegasus") > 0 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100031, 5, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  Spawn({desc = "Units/Paratroopers/Weapons/british/british_airborne_6p_qf_mk_ii.dsc", position = {162, 3, 43}, player = "Enemy"}) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 12*10, function()  Spawn({desc = "Units/Paratroopers/Weapons/british/british_airborne_6p_qf_mk_ii.dsc", position = {187, 3, 44}, player = "Enemy"}) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 18*10, function()  SpawnAmmoFuel("ammo_4000.dsc", {"LZ_W3_ammo", }, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  Spawn({desc = "Units/Paratroopers/Weapons/british/british_airborne_6p_qf_mk_ii.dsc", position = {272, 3, -36}, player = "Enemy"}) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  MoveGroupToZone("LZ_W", "Bridge_Pegasus", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  SetGroupBehaviour("LZ_W", nil, true, nil, nil, nil, true, nil, nil, true, nil) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  Spawn({desc = "Units/Paratroopers/Weapons/british/british_airborne_6p_qf_mk_ii.dsc", position = {215, 3, -4}, player = "Enemy"}) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  SetGroupBehaviour("LZ_W", nil, true, nil, nil, nil, nil, nil, nil, nil, nil) end)
		AIparts:RemovePeriodic("071. Pegasus Bridge taken")
	end
end

function func_063__Ranville_taken()
	if NumPlayerUnitsInZone("Player", "Village_Ranville") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Ranville") > 0 then
		mission.OutScreenMessage(100034, 5, "0xFFFF0000")
		AIparts:RemovePeriodic("063. Ranville taken")
	end
end

function func_072__Orne_Bridge_is_taken()
	if NumPlayerUnitsInZone("Player", "Bridge_Orne") < 1 and NumPlayerUnitsInZone("Enemy", "Bridge_Orne") > 0 then
		mission.OutScreenMessage(100032, 5, "0xFFFF0000")
		MoveGroupToZone("LZ_N", "Bridge_Orne", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  Spawn({desc = "Units/Paratroopers/Weapons/british/british_airborne_6p_qf_mk_ii.dsc", position = {544, 3, 0.3}, player = "Enemy"}) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  Spawn({desc = "Units/Paratroopers/Weapons/british/british_airborne_6p_qf_mk_ii.dsc", position = {452, 3, 6}, player = "Enemy"}) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  SetGroupBehaviour("LZ_N", true, true, nil, nil, nil, true, nil, nil, true, nil) end)
		AIparts:RemovePeriodic("072. Orne Bridge is taken")
	end
end

function func_073__Merville_Battery_is_taken()
	if NumPlayerUnitsInZone("Player", "Merville_Battery") < 1 and NumPlayerUnitsInZone("Enemy", "Merville_Battery") > 0 then
		mission.OutScreenMessage(100033, 5, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  SpawnUnit("Units/Paratroopers/Weapons/british/british_airborne_6p_qf_mk_ii.dsc", "Enemy", {"Bat_Merville_6", }, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  SpawnUnit("Units/Paratroopers/Weapons/british/british_airborne_6p_qf_mk_ii.dsc", "Enemy", {"Bat_Merville_7", }, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  GroupSetMicroAIBehaviour("LZ_V", "Cautious") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 125*10, function()  SetGroupBehaviour("LZ_V", nil, true, nil, nil, nil, true, true, nil, nil, nil) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  SetGroupBehaviour("LZ_V", nil, true, nil, nil, nil, nil, nil, nil, nil, nil) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  RunSpawn("Player", {"German_711_sdkfz234", "German_711_sdkfz234", "German_711_38t", "German_711_B1", "German_711_B1", "German_711_sdkfz10", }, "To_Cabourg", "", "", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 365*10, function()  mission.OutScreenMessage(100041, 10, "0xFF00CC00") end)
		AIparts:RemovePeriodic("073. Merville Battery is taken")
	end
end

function func_010__6th_Airborne_Paradrop_W()
	if GetGameTime() > 5 then
		 dofile("Missions/Single/Caen/para.lua") 
		para.ParaPlane("Enemy", "LZ_W", "N", "W", 5, 0, "LZ_W")
		para.ParaPlane("Enemy", "LZ_W", "N", "W", 5, 0, "LZ_W")
		para.ParaPlane("Enemy", "LZ_W", "N", "W", 5, 0, "LZ_W")
		para.ParaPlane("Enemy", "LZ_W", "N", "W", 5, 0, "LZ_W")
		AIparts:RemovePeriodic("010. 6th Airborne Paradrop W")
	end
end

function func_011a__6th_LZ_W_attack_Pegasus_Bridge()
	if GetGameTime() > 80 then
		UpdateGroupCounters("LZ_W")
		MoveGroupToZone("LZ_W", "Bridge_Pegasus", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  UnloadTransports("LZ_W") end)
		AIparts:RemovePeriodic("011a. 6th LZ_W attack Pegasus Bridge")
	end
end

function func_012__6th_LZ_N_to_LZ_N()
	if GetGameTime() > 125 then
		MoveGroupToZone("LZ_N", "LZ_N", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("LZ_X", "LZ_X", false, false) end)
		AIparts:RemovePeriodic("012. 6th LZ_N to LZ_N")
	end
end

function func_013a__6th_LZ_V_to_Merville_Battery()
	if NumPlayerUnitsInZone("Player", "Bridge_Pegasus") < 1 or GetGameTime() > 600 then
		UpdateGroupCounters("LZ_V")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  MoveGroupToZone("LZ_V", "Merville_Battery", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 62*10, function()  mission.OutScreenMessage(100035, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 64*10, function()  SetGroupBehaviour("LZ_W_Mortars", nil, nil, nil, nil, nil, nil, true, true, nil, nil) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  SendPlane("Enemy", "Bat_Merville_5", "scout", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 75*10, function()  SendPlane("Enemy", "Bat_Merville_5", "scout", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  SendPlane("Enemy", "Bat_Merville_5", "scout", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 85*10, function()  SendPlane("Enemy", "Bat_Merville_5", "scout", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  MoveGroupToZone("LZ_V", "Merville_Battery", true, false) end)
		AIparts:RemovePeriodic("013a. 6th LZ_V to Merville Battery")
	end
end

function func_014__6th_LZ_K_to_village_Troarn()
	if NumPlayerUnitsInZone("Player", "Merville_Battery") < 1 or GetGameTime() > 1200 then
		UpdateGroupCounters("LZ_K")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  MoveGroupToZone("LZ_K", "Village_Troarn", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 62*10, function()  mission.OutScreenMessage(100036, 10, "0xFFFF0000") end)
		AIparts:RemovePeriodic("014. 6th LZ_K to village Troarn")
	end
end

function func_064__Troarn_taken()
	if NumPlayerUnitsInZone("Player", "Village_Troarn") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Troarn") > 0 then
		mission.OutScreenMessage(100037, 10, "0xFFFF0000")
		 dofile("Missions/Single/Caen/para.lua") 
		para.ParaPlane("Enemy", "LZ_K", "N", "W", 5, 0, "LZ_K")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  MoveGroupToZone("LZ_K", "LZ_K", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  Bombardment("Bridge_Troarn", 0, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  CreateFXObject("buildings/bridge_broken_05.dsc", "Bridge_Troarn", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  MoveGroupToZone("LZ_X", "Village_Ranville", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 130*10, function()  TransferUnits("British_3rd", 0, "LZ_K", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  UpdateGroupCounters("LZ_K") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  MoveGroupToZone("LZ_K", "Village_Bures", false, false) end)
		AIparts:RemovePeriodic("064. Troarn taken")
	end
end

function func_065__Bures_taken()
	if NumPlayerUnitsInZone("Player", "Village_Bures") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Bures") > 0 then
		mission.OutScreenMessage(100038, 10, "0xFFFF0000")
		MoveGroupToZone("LZ_K", "Village_Troarn", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  Bombardment("Bridge_Bures", 0, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 64*10, function()  CreateFXObject("buildings/bridge_broken_05.dsc", "Bridge_Bures", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  Bombardment("Bridge_Bures_Rail", 0, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 69*10, function()  CreateFXObject("buildings/bridge_broken_05.dsc", "Bridge_Bures_Rail", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  SetGroupBehaviour("LZ_K", true, nil, nil, nil, nil, nil, true, nil, nil, nil) end)
		AIparts:RemovePeriodic("065. Bures taken")
	end
end

function func_010__6th_Airborne_Paradrop_K()
	if GetGameTime() > 20 then
		 dofile("Missions/Single/Caen/para.lua") 
		para.ParaPlane("Enemy", "LZ_K", "N", "W", 5, 0, "LZ_K")
		para.ParaPlane("Enemy", "LZ_K", "N", "W", 5, 0, "LZ_K")
		para.ParaPlane("Enemy", "LZ_K", "N", "W", 5, 0, "LZ_K")
		AIparts:RemovePeriodic("010. 6th Airborne Paradrop K")
	end
end

function func_010__6th_Airborne_Paradrop_V()
	if GetGameTime() > 30 then
		 dofile("Missions/Single/Caen/para.lua") 
		para.ParaPlane("Enemy", "LZ_V", "N", "W", 5, 0, "LZ_V")
		para.ParaPlane("Enemy", "LZ_V", "N", "W", 5, 0, "LZ_V")
		para.ParaPlane("Enemy", "LZ_V", "N", "W", 5, 0, "LZ_V")
		para.ParaPlane("Enemy", "LZ_V", "N", "W", 5, 0, "LZ_V")
		para.ParaPlane("Enemy", "LZ_V", "N", "W", 5, 0, "LZ_V")
		AIparts:RemovePeriodic("010. 6th Airborne Paradrop V")
	end
end

function func_010__6th_Airborne_Paradrop_X()
	if GetGameTime() > 40 then
		 dofile("Missions/Single/Caen/para.lua") 
		para.ParaPlane("Enemy", "LZ_X", "N", "W", 5, 0, "LZ_X")
		para.ParaPlane("Enemy", "LZ_X", "N", "W", 5, 0, "LZ_X")
		AIparts:RemovePeriodic("010. 6th Airborne Paradrop X")
	end
end

function func_010__6th_Airborne_Paradrop_N()
	if GetGameTime() > 50 then
		 dofile("Missions/Single/Caen/para.lua") 
		para.ParaPlane("Enemy", "LZ_N", "N", "W", 5, 0, "LZ_N")
		para.ParaPlane("Enemy", "LZ_N", "N", "W", 5, 0, "LZ_N")
		AIparts:RemovePeriodic("010. 6th Airborne Paradrop N")
	end
end

function func_010__6th_Airborne_Paradrop_Y()
	if GetGameTime() > 60 then
		 dofile("Missions/Single/Caen/para.lua") 
		para.ParaPlane("Enemy", "LZ_Y", "N", "W", 5, 0, "LZ_Y")
		para.ParaPlane("Enemy", "LZ_Y", "N", "W", 5, 0, "LZ_Y")
		AIparts:RemovePeriodic("010. 6th Airborne Paradrop Y")
	end
end

function func_128a__Orne_Canal_to_Defence_coast()
	if NumPlayerUnitsInZone("Player", "Caen_Canal_Orne_1") < 1 and NumPlayerUnitsInZone("Enemy", "Caen_Canal_Orne_1") > 0 then
		MoveGroupToZone("LZ_Y", "Defence_Orne_and_Caen_Canal", false, false)
		SendPlane("Enemy", "airstrike_bunker", "bomber", "N", 5, -1, "")
		AIparts:RemovePeriodic("128a. Orne Canal to Defence coast")
	end
end

function func_128b__Orne_Canal_to_Defence_coast()
	if NumPlayerUnitsInZone("Player", "Defence_Orne_and_Caen_Canal") < 1 and NumPlayerUnitsInZone("Enemy", "Defence_Orne_and_Caen_Canal") > 0 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  DisappearUnitsInGroup("LZ_Y") end)
		AIparts:RemovePeriodic("128b. Orne Canal to Defence coast")
	end
end

function func_141a__21pzr_at_Douvres()
	if IsObjectiveActive("Douvres_La_Delivrance") and NumGroupUnitsInZone("21_Pzr_repair", "Village_Douvres") > 2 and IsObjectiveFailed("Lion-sur-Mer", "Player") and GetGameTime() < 18000 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  SendPlane("Enemy", "Village_Douvres", "scout", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  mission.OutScreenMessage(100045, 20, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 89*10, function()  RunSpawn("Enemy", {"Canadian_Cromwell", "Canadian_Cromwell", "Canadian_Cromwell", "Canadian_Firefly", "Canadian_Firefly", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 130*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Douvres", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  UnloadTransports("Canadian_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 145*10, function()  UpdateGroupCounters("Canadian_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Douvres", true, false) end)
		AIparts:RemovePeriodic("141a. 21pzr at Douvres")
	end
end

function func_000__Counter_of_landing()
	if GetGameTime() > 10 then
		AcivateObjective("Landing")
		ProceedObjective("Landing", "Player")
		AIparts:RemovePeriodic("000. Counter of landing")
	end
end

function func_127b__OuistrehamBeach_to_OuistrehamTown2()
	if NumPlayerUnitsInZone("Player", "Beach_Quistreham_2") < 1 and NumPlayerUnitsInZone("Enemy", "Beach_Quistreham_2") > 0 then
		mission.OutScreenMessage(100042, 15, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  AcivateObjective("Ouistreham") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("3rd_Quistreham", "Town_Quistreham_3", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  MoveGroupToZone("LZ_Y", "Caen_Canal_Orne_1", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  UnloadTransports("LZ_Y") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  MoveGroupToZone("LZ_Y", "Caen_Canal_Orne_1", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 720*10, function()  MoveGroupToZone("3rd_Quistreham", "Town_Quistreham_4", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 725*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Hermanville", "3rd_Quistreham", "3rd_Quistreham", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 750*10, function()  UnloadTransports("3rd_Quistreham") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 755*10, function()  MoveGroupToZone("3rd_Quistreham", "Town_Quistreham_4", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1080*10, function()  SetObjectiveComplete("Ouistreham", "Enemy") end)
		AIparts:RemovePeriodic("127b. OuistrehamBeach to OuistrehamTown2")
	end
end

function func_000__Presets_Mortars()
	do
		groups.CreateTemplate("Mortars_LZV", groups.ttypes.howitzer,
			{ call_for_help = true, call_for_howitzer = false, reinf_lost = 0,
			groups_list = {"LZ_V", }, alert_rad = 5000,
			num_voley = 5, advantage = 0.00, shot_timeout = 3, rest_time = 15, safe_rad = 1, min_ammo = 0})
	end
	do
		groups.AssignTemplate("Mortars_LZV", "LZ_V")
	end
end

function func_013b__6th_LZ_V_to_Merville_Battery_unload()
	if NumGroupUnitsInZone("LZ_V", "Merville_Battery") > 0 then
		UnloadTransports("LZ_V")
		AIparts:RemovePeriodic("013b. 6th LZ_V to Merville Battery unload")
	end
end

function func_150__Reinforcements_21_PD()
	if IsObjectiveCompleted("Douvres_La_Delivrance", "Enemy") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  mission.OutScreenMessage(100043, 15, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Player", {"German_21_motor", "German_21_motor", "German_21_Kubelwagen", "German_21_Puma", "German_21_Puma", }, "To_Villeneuve", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  mission.OutScreenMessage(100086, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 75*10, function()  RunSpawn("Player", {"German_21_250", "German_21_250", "German_21_234", "German_21_234", }, "To_Villeneuve", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  MoveGroupToZone("27th_Armoured", "Village_Periers", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  RunSpawn("Player", {"German_21_Hummel", "German_21_Hummel", "German_21_Hummel", }, "To_Caen_East", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 365*10, function()  mission.OutScreenMessage(100091, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 375*10, function()  RunSpawn("Player", {"German_21_Nebelwerfers", "German_21_Nebelwerfers", "German_21_Nebelwerfers", }, "To_Caen_East", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 380*10, function()  MoveGroupToZone("3rd_Firefly", "Village_Carpiquet", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 720*10, function()  RunSpawn("Player", {"German_21_Sturmgeschutz", "German_21_Sturmgeschutz", "German_21_Sturmgeschutz", "German_21_Sturmgeschutz", "German_21_MarderIII", }, "To_Caen_East", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 725*10, function()  mission.OutScreenMessage(100087, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 740*10, function()  RunSpawn("Player", {"German_21_MarderIII", "German_21_MarderIII", "German_21_251_Pak", "German_21_251_Pak", "German_21_251_Pak", }, "To_Caen_East", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1080*10, function()  RunSpawn("Player", {"German_21_88mm", "German_21_88mm", "German_21_88mm", }, "To_Caen_East", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1085*10, function()  mission.OutScreenMessage(100090, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1100*10, function()  RunSpawn("Player", {"German_21_10_4", "German_21_10_4", "German_21_10_4", }, "To_Caen_East", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1460*10, function()  RunSpawn("Player", {"German_21_pioneer", "German_21_pioneer", "German_21_pioneer", }, "To_Villeneuve_B", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1465*10, function()  mission.OutScreenMessage(100088, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1480*10, function()  RunSpawn("Player", {"German_21_Munition", "German_21_Munition", "German_21_Fuel", "German_21_Fuel", }, "To_Villeneuve_B", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1485*10, function()  SendPlane("Enemy", "21pzr_Airstrike_1", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1487*10, function()  SendPlane("Enemy", "21pzr_Airstrike_2", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1488*10, function()  mission.OutScreenMessage(100030, 5, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1491*10, function()  SendPlane("Enemy", "21pzr_Airstrike_4", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1493*10, function()  SendPlane("Enemy", "21pzr_Airstrike_5", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1840*10, function()  RunSpawn("Player", {"German_21_PanzerIVH", "German_21_PanzerIVH", "German_21_PanzerIVH", "German_21_PanzerIVH", "German_21_PanzerIVH", }, "To_Caen_East", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1845*10, function()  mission.OutScreenMessage(100089, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1860*10, function()  RunSpawn("Player", {"German_21_PanzerIVH", "German_21_PanzerIVH", "German_21_PanzerIVH", "German_21_PanzerIVH", "German_21_PanzerIVH", "German_21_251", "German_21_251", }, "To_Caen_East", "21_Pzr_repair", "21_Pzr_repair", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1870*10, function()  SetEvent("EvTrain_Ammo") end)
		AIparts:RemovePeriodic("150. Reinforcements 21.PD")
	end
end

function func_003b__Richter_is_dead()
	if IsEventPresent("EvRichterArrived") then
		dofile("Missions/Single/Caen/para2.lua")
		msd_vars.varRichterAlive = para.IsUnitDead(msd_vars.varRichter_ID, "Player")
		LogVariable("varRichterAlive = ", msd_vars.varRichterAlive)
	end
	if IsEventPresent("EvRichterArrived") and not msd_vars.varRichterAlive then
		mission.OutScreenMessage(100007, 5, "0xFFFF0000")
		log("RichterDead")
		SetEvent("EvRichterKilled")
		AIparts:RemovePeriodic("003b. Richter is dead")
	end
end

function func_900__special_lighthouse()
	if NumPlayerUnitsInZone("Player", "Lighthouse") > 0 and NumPlayerUnitsInZone("Player", "Defence_Orne_and_Caen_Canal") < 1 and GetGameTime() > 7200 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  SendPlane("Enemy", "Lighthouse", "bomber", "N", 1, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 62*10, function()  SendPlane("Enemy", "Lighthouse", "bomber", "N", 1, -1, "") end)
		AIparts:RemovePeriodic("900. special lighthouse")
	end
end

function func_127c__Ouistreham_taken()
	if IsObjectiveCompleted("Ouistreham", "Enemy") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  DisappearUnitsInZone("Town_Quistreham_1") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 12*10, function()  DisappearUnitsInZone("Town_Quistreham_2") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 14*10, function()  DisappearUnitsInZone("Town_Quistreham_3") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 16*10, function()  DisappearUnitsInZone("Town_Quistreham_4") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  mission.OutScreenMessage(100044, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  DisappearUnitsInZone("Town_Quistreham_1") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 62*10, function()  DisappearUnitsInZone("Town_Quistreham_2") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 64*10, function()  DisappearUnitsInZone("Town_Quistreham_3") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 66*10, function()  DisappearUnitsInZone("Town_Quistreham_4") end)
		AIparts:RemovePeriodic("127c. Ouistreham taken")
	end
end

function func_145a__Attack_Franceville_West()
	if IsObjectiveCompleted("Douvres_La_Delivrance", "Enemy") and NumPlayerUnitsInZone("Enemy", "Bridge_Pegasus") > 0 and NumPlayerUnitsInZone("Player", "Beach_Franceville_West") > 0 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  mission.OutScreenMessage(100010, 5, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  SendPlane("Enemy", "Village_Franceville", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  SendPlane("Enemy", "Village_Franceville1", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  SendPlane("Enemy", "Village_Franceville2", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  SendPlane("Enemy", "Village_Franceville3", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  SendPlane("Enemy", "Village_Franceville4", "bomber", "N", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 55*10, function()  mission.OutScreenMessage(100046, 20, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 57*10, function()  AcivateObjective("Franceville") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Firefly", "British_Firefly", "British_Halftrack", }, "Spawn_Merville", "3rd_Franceville_land", "3rd_Franceville_land", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 85*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Merville", "3rd_Franceville_land", "3rd_Franceville_land", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 105*10, function()  RunSpawn("Enemy", {"British_Churchill_FT", "British_Churchill_FT", "British_Churchill_FT", "British_Bren_FT", "British_Bren_FT", }, "Spawn_Merville", "3rd_Franceville_land", "3rd_Franceville_land", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 125*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Merville", "3rd_Franceville_land", "3rd_Franceville_land", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 135*10, function()  UpdateGroupCounters("3rd_Franceville_land") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  MoveGroupToZone("3rd_Franceville_land", "Beach_Franceville_West", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 165*10, function()  UnloadTransports("3rd_Franceville_land") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 170*10, function()  MoveGroupToZone("3rd_Franceville_land", "Beach_Franceville_West", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 250*10, function()  RunSpawn("Enemy", {"British_Bren_FT", "British_Bren_FT", "British_Bren_FT", "British_Centaur", "British_Centaur", }, "Spawn_Merville", "3rd_Franceville_land", "3rd_Franceville_land", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 280*10, function()  UnloadTransports("3rd_Franceville_land") end)
		AIparts:RemovePeriodic("145a. Attack Franceville West")
	end
end

function func_145b__Attack_Franceville_East()
	if NumPlayerUnitsInZone("Player", "Beach_Franceville_West") < 1 and NumPlayerUnitsInZone("Enemy", "Beach_Franceville_West") > 0 then
		MoveGroupToZone("3rd_Franceville_land", "Beach_Franceville_East", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  RunSpawn("Enemy", {"British_Bren_FT", "British_Bren_FT", "British_Bren_FT", "British_Churchill_FT", "British_Churchill_FT", }, "Spawn_Merville", "3rd_Franceville_land", "3rd_Franceville_land", false, false, {}, true, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  UnloadTransports("3rd_Franceville_land") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  MoveGroupToZone("3rd_Franceville_land", "Beach_Franceville_East", false, false) end)
		AIparts:RemovePeriodic("145b. Attack Franceville East")
	end
end

function func_145c__Attack_Franceville_Village()
	if NumPlayerUnitsInZone("Player", "Beach_Franceville_East") < 1 and NumPlayerUnitsInZone("Enemy", "Beach_Franceville_East") > 0 then
		MoveGroupToZone("3rd_Franceville_land", "Village_Franceville", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  RunSpawn("Enemy", {"British_Bren_FT", "British_Bren_FT", "British_Bren_FT", "British_Churchill_FT", "British_Churchill_FT", }, "Spawn_Merville", "3rd_Franceville_land", "3rd_Franceville_land", false, false, {}, true, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  MoveGroupToZone("3rd_Franceville_land", "Village_Franceville", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  UnloadTransports("3rd_Franceville_land") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  MoveGroupToZone("3rd_Franceville_land", "Village_Franceville", true, false) end)
		AIparts:RemovePeriodic("145c. Attack Franceville Village")
	end
end

function func_146__Franceville_taken()
	if NumPlayerUnitsInZone("Player", "Village_Franceville") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Franceville") > 1 or GetGameTime() > 12000 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SetGroupBehaviour("3rd_Franceville_land", false, nil, false, nil, true, nil, nil, nil, nil, nil) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  DisappearUnitsInZone("Beach_Franceville_East") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 12*10, function()  DisappearUnitsInZone("Beach_Franceville_West") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 14*10, function()  DisappearUnitsInZone("Village_Franceville") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  mission.OutScreenMessage(100047, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  SetObjectiveComplete("Franceville", "Enemy") end)
		AIparts:RemovePeriodic("146. Franceville taken")
	end
end

function func_175a__11700_Attack_Herouvilette()
	if GetGameTime() > 11700 and IsObjectiveCompleted("Franceville", "Enemy") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 85*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 125*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 130*10, function()  UpdateGroupCounters("3rd_Herouvillette") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 135*10, function()  MoveGroupToZone("3rd_Herouvillette", "Village_Herouvillette", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 725*10, function()  SetEvent("EvTownCollombelles") end)
		AIparts:RemovePeriodic("175a. 11700 Attack Herouvilette")
	end
	if GetGameTime() > 11700 and IsObjectiveCompleted("Franceville", "Enemy") and NumGroupUnitsInZone("21_Pzr_repair", "Village_Herouvillette") > 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 85*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 125*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 135*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  UpdateGroupCounters("3rd_Herouvillette") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 145*10, function()  MoveGroupToZone("3rd_Herouvillette", "Village_Herouvillette", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 725*10, function()  SetEvent("EvTownCollombelles") end)
		AIparts:RemovePeriodic("175a. 11700 Attack Herouvilette")
	end
end

function func_066__Herouvillette_taken()
	if NumPlayerUnitsInZone("Player", "Village_Herouvillette") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Herouvillette") > 0 then
		mission.OutScreenMessage(100048, 10, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SetObjectiveComplete("Herouvillette", "Enemy") end)
		AIparts:RemovePeriodic("066. Herouvillette taken")
	end
end

function func_175b__11700_Attack_Herouvilette()
	if NumGroupUnitsInZone("3rd_Herouvillette", "Village_Herouvillette") > 0 then
		UnloadTransports("3rd_Herouvillette")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("3rd_Herouvillette", "Village_Herouvillette", false, false) end)
		AIparts:RemovePeriodic("175b. 11700 Attack Herouvilette")
	end
end

function func_160_10800_Attack_Benouville_and_Lebisey()
	if GetGameTime() > 10800 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 800*10, function()  UnloadTransports("Landingboats") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 810*10, function()  MoveGroupToZone("3rd_Colleville", "Village_Benouville", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 820*10, function()  MoveGroupToZone("3rd_LaBreche", "Village_Benouville", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 830*10, function()  MoveGroupToZone("3rd_LionsurMer", "Village_Benouville", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 900*10, function()  MoveGroupToZone("3rd_Colleville", "Forest_Lebisey", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 920*10, function()  mission.OutScreenMessage(100051, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1145*10, function()  UnloadTransports("Landingboats") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1155*10, function()  SendPlane("Player", "Village_Benouville", "scout", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1160*10, function()  MoveGroupToZone("3rd_LaBreche", "Forest_Lebisey", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1170*10, function()  MoveGroupToZone("3rd_LionsurMer", "Forest_Lebisey", false, false) end)
		AIparts:RemovePeriodic("160.10800 Attack Benouville and Lebisey")
	end
end

function func_067__Perriers_sur_le_Dan_is_taken()
	if NumPlayerUnitsInZone("Player", "Village_Periers") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Periers") > 0 then
		mission.OutScreenMessage(100049, 5, "0xFFFF0000")
		AIparts:RemovePeriodic("067. Perriers sur le Dan is taken")
	end
end

function func_068__Benouville_taken()
	if NumPlayerUnitsInZone("Player", "Village_Benouville") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Benouville") > 0 then
		mission.OutScreenMessage(100050, 5, "0xFFFF0000")
		AIparts:RemovePeriodic("068. Benouville taken")
	end
end

function func_000__Win_or_Loose()
	if IsEventPresent("EvMeyerKilled") and IsEventPresent("EvFeuchtingerKilled") and IsEventPresent("EvRichterKilled") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  mission.OutScreenMessage(100005, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 26*10, function()  PlayerDefeat("Player") end)
		AIparts:RemovePeriodic("000. Win or Loose")
	end
	if NumPlayerUnitsInZone("Player", "HQ_21") < 1 and NumPlayerUnitsInZone("Enemy", "HQ_21") > 0 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  mission.OutScreenMessage(100001, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 26*10, function()  PlayerDefeat("Player") end)
		AIparts:RemovePeriodic("000. Win or Loose")
	end
	if IsEventPresent("EvCounterattack") and IsObjectiveCompleted("LZ_K", "Player") and IsObjectiveCompleted("Pegasus_Bridge", "Player") and IsObjectiveCompleted("Franceville2", "Player") and IsObjectiveCompleted("Douvres_La_Delivrance2", "Player") and IsObjectiveCompleted("Lion-sur-Mer2", "Player") and IsObjectiveCompleted("Ouistreham2", "Player") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  mission.OutScreenMessage(100071, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 26*10, function()  PlayerWin("Player") end)
		AIparts:RemovePeriodic("000. Win or Loose")
	end
	if GetGameTime() > 15000 and NumPlayerUnits("Player") < 20 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  mission.OutScreenMessage(100073, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 26*10, function()  PlayerDefeat("Player") end)
		AIparts:RemovePeriodic("000. Win or Loose")
	end
end

function func_002b__Feuchtinger_is_dead()
	if IsEventPresent("EvFeuchtingerArrived") then
		dofile("Missions/Single/Caen/para2.lua")
		msd_vars.varFeuchtingerAlive = para.IsUnitDead(msd_vars.varFeuchtinger_ID, "Player")
		LogVariable("varFeuchtingerAlive = ", msd_vars.varFeuchtingerAlive)
	end
	if IsEventPresent("EvFeuchtingerArrived") and not msd_vars.varFeuchtingerAlive then
		mission.OutScreenMessage(100006, 5, "0xFFFF0000")
		log("FeuchtingerDead")
		SetEvent("EvFeuchtingerKilled")
		AIparts:RemovePeriodic("002b. Feuchtinger is dead")
	end
end

function func_001a__Meyer_arrived()
	if IsEventPresent("EvKubelwagenArrived") then
		msd_vars.varMeyer_ID = Spawn({desc = "Mods/Caen2/WaffenSS_Meyer.dsc", position = {-463, 3, -832}, player = "Player"})
		LogVariable("varMeyer_ID = ", msd_vars.varMeyer_ID)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SetEvent("EvMeyerArrived") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 7*10, function()  mission.OutScreenMessage(100082, 15, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 22*10, function()  SetGroupSelectable("12_SSA", true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  SetEvent("EvKubelwagenArrived2") end)
		AIparts:RemovePeriodic("001a. Meyer arrived")
	end
end

function func_001b__Meyer_is_dead()
	if IsEventPresent("EvMeyerArrived") then
		dofile("Missions/Single/Caen/para2.lua")
		msd_vars.varMeyerAlive = para.IsUnitDead(msd_vars.varMeyer_ID, "Player")
		LogVariable("varMeyerAlive = ", msd_vars.varMeyerAlive)
	end
	if IsEventPresent("EvMeyerArrived") and not msd_vars.varMeyerAlive then
		mission.OutScreenMessage(100008, 5, "0xFFFF0000")
		log("MeyerDead")
		SetEvent("EvMeyerKilled")
		AIparts:RemovePeriodic("001b. Meyer is dead")
	end
end

function func_502__Arrival_BF_Meyer()
	if NumGroupUnitsNearPoint("12_SSA", 0, "HQ_12SS", 1) > 0 or NumGroupUnitsInZone("12_SSA", "HQ_12SS") > 0 then
		SetEvent("EvKubelwagenArrived")
		AIparts:RemovePeriodic("502. Arrival BF Meyer")
	end
end

function func_002a__Feuchtinger_arrived()
	do
		dofile("Missions/Single/Caen/para2.lua")
		msd_vars.varFeuchtinger_ID = (1054)
		LogVariable("varFeuchtinger_ID = ", msd_vars.varFeuchtinger_ID)
		SetEvent("EvFeuchtingerArrived")
	end
end

function func_003a__Richter_arrived()
	do
		dofile("Missions/Single/Caen/para2.lua")
		msd_vars.varRichter_ID = (60045)
		LogVariable("varRichter_ID = ", msd_vars.varRichter_ID)
		SetEvent("EvRichterArrived")
	end
end

function func_176__13200_Attack_Collombelles()
	if GetGameTime() > 13200 and IsEventPresent("EvTownCollombelles") then
		MoveGroupToZone("3rd_Herouvillette", "Town_Collombelles", false, false)
		SendPlane("Enemy", "Colombelles_Airstrike_1", "extra", "N", 25, -1, "")
		SendPlane("Enemy", "Colombelles_Airstrike_2", "extra", "N", 25, -1, "")
		SendPlane("Enemy", "Colombelles_Airstrike_3", "extra", "N", 25, -1, "")
		SendPlane("Enemy", "Colombelles_Airstrike_4", "extra", "N", 25, -1, "")
		mission.OutScreenMessage(100063, 10, "0xFFFF0000")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  mission.OutScreenMessage(100052, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 55*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  MoveGroupToZone("3rd_Herouvillette", "Town_Collombelles", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  UnloadTransports("3rd_Herouvillette") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  MoveGroupToZone("3rd_Herouvillette", "Town_Collombelles", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 180*10, function()  SetEvent("EvArtillery_present") end)
		AIparts:RemovePeriodic("176. 13200 Attack Collombelles")
	end
end

function func_004__Luftflotte3()
	if IsEventPresent("EvLuftflotte3") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AddBonus(1, 8, 3, -1, -1) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 12*10, function()  mission.OutScreenMessage(100054, 15, "0xFF00CC00") end)
		AIparts:RemovePeriodic("004. Luftflotte3")
	end
end

function func_013c__6th_LZ_V_to_Merville_Battery_()
	if NumGroupUnits("LZ_V", 0, false, false, true) < 35 and GetGameTime() < 3600 then
		 dofile("Missions/Single/Caen/para.lua") 
		para.ParaPlane("Enemy", "LZ_V", "N", "W", 5, 0, "LZ_V")
		para.ParaPlane("Enemy", "LZ_V", "N", "W", 5, 0, "LZ_V")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 75*10, function()  MoveGroupToZone("LZ_V", "Merville_Battery", false, false) end)
		AIparts:RemovePeriodic("013c. 6th LZ_V to Merville Battery ")
	end
end

function func_011b__6th_LZ_W_attack_Pegasus_Bridge()
	if NumGroupUnits("LZ_W", 0, false, false, true) < 35 and GetGameTime() < 3600 then
		 dofile("Missions/Single/Caen/para.lua") 
		para.ParaPlane("Enemy", "LZ_W", "N", "W", 5, 0, "LZ_W")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 75*10, function()  MoveGroupToZone("LZ_W", "Bridge_Pegasus", false, false) end)
		AIparts:RemovePeriodic("011b. 6th LZ_W attack Pegasus Bridge")
	end
end

function func_030__Airplanes_45m()
	if GetGameTime() > 2700 then
		SendPlane("Enemy", "45m_Airstrike_0", "extra", "NE", 25, -1, "")
		SendPlane("Enemy", "45m_Airstrike_1", "extra", "NE", 25, -1, "")
		SendPlane("Enemy", "45m_Airstrike_2", "extra", "NE", 25, -1, "")
		SendPlane("Enemy", "45m_Airstrike_3", "extra", "NE", 25, -1, "")
		SendPlane("Enemy", "45m_Airstrike_4", "extra", "NE", 25, -1, "")
		mission.OutScreenMessage(100010, 5, "0xFFFF0000")
		AIparts:RemovePeriodic("030. Airplanes 45m")
	end
end

function func_054__Passenger_train()
	if GetGameTime() > 2100 then
		RunSpawn("Player", {"German_train_Passenger", }, "Train", "", "", false, false, {{dislocation="End_of_track", }, {disappear=true, }, }, false, 50)
		mission.OutScreenMessage(100053, 5, "0xFF00CC00")
		AIparts:RemovePeriodic("054. Passenger train")
	end
end

function func_137d__Lion_sur_Mer_is_taken_Event()
	if IsEventPresent("EvVillageLionSurMer") and not IsObjectiveCompleted("Lion-sur-Mer", "Player") then
		FailObjective("Lion-sur-Mer")
		AIparts:RemovePeriodic("137d. Lion-sur-Mer is taken Event")
	end
	if IsEventPresent("EvVillageLionSurMer") and NumPlayerUnitsInZone("Player", "Village_LionsurMer") > 0 and NumPlayerUnitsInZone("Enemy", "Village_LionsurMer") < 1 then
		SetObjectiveComplete("Lion-sur-Mer", "Player")
		AIparts:RemovePeriodic("137d. Lion-sur-Mer is taken Event")
	end
end

function func_000__Warning_2_Generals_are_dead()
	if IsEventPresent("EvMeyerKilled") and IsEventPresent("EvFeuchtingerKilled") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  mission.OutScreenMessage(100003, 15, "0xFFFF0000") end)
		AIparts:RemovePeriodic("000. Warning 2 Generals are dead")
	end
	if IsEventPresent("EvMeyerKilled") and IsEventPresent("EvRichterKilled") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  mission.OutScreenMessage(100004, 15, "0xFFFF0000") end)
		AIparts:RemovePeriodic("000. Warning 2 Generals are dead")
	end
	if IsEventPresent("EvRichterKilled") and IsEventPresent("EvFeuchtingerKilled") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  mission.OutScreenMessage(100002, 15, "0xFFFF0000") end)
		AIparts:RemovePeriodic("000. Warning 2 Generals are dead")
	end
end

function func_015__6th_LZ_N_attack_Orne_Bridge()
	if GetGameTime() > 1600 then
		MoveGroupToZone("LZ_N", "Bridge_Orne", false, false)
		AIparts:RemovePeriodic("015. 6th LZ_N attack Orne Bridge")
	end
end

function func_016__6th_LZ_X_attack_Ranville()
	if GetGameTime() > 2200 then
		MoveGroupToZone("LZ_X", "Village_Ranville", false, false)
		AIparts:RemovePeriodic("016. 6th LZ_X attack Ranville")
	end
end

function func_000__Camera()
	if GetGameTime() > 6 then
		mission.CameraLock(true)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  mission.CameraAt({-951.281555, 3.065537, -329.192780}, 45.000000, 89.417725, 75.344215, 5.00) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 7*10, function()  mission.OutScreenMessage(100000, 25, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 32*10, function()  mission.CameraLock(false) end)
		AIparts:RemovePeriodic("000. Camera")
	end
end

function func_177__14100_Attack_Canadian_Division_HQ716()
	if GetGameTime() > 14100 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 340*10, function()  SendPlane("Player", "Douvres", "scout", "S", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 335*10, function()  RunSpawn("Enemy", {"Canadian_Cromwell", "Canadian_Cromwell", "Canadian_Cromwell", "Canadian_Firefly", "Canadian_Firefly", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  mission.OutScreenMessage(100055, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 365*10, function()  RunSpawn("Enemy", {"Canadian_Cromwell", "Canadian_Cromwell", "Canadian_Cromwell", "Canadian_Firefly", "Canadian_Firefly", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 385*10, function()  RunSpawn("Enemy", {"Canadian_Bren", "Canadian_Bren", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 405*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_Cromwell", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 420*10, function()  UpdateGroupCounters("Canadian_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 421*10, function()  MoveGroupToZone("Canadian_3rd", "HQ_716", false, false) end)
		AIparts:RemovePeriodic("177. 14100 Attack Canadian Division HQ716")
	end
end

function func_178__14100_Attack_Canadian_Division_Villeneuve()
	if NumPlayerUnitsInZone("Player", "HQ_716") < 1 and NumPlayerUnitsInZone("Enemy", "HQ_716") > 1 then
		MoveGroupToZone("Canadian_3rd", "Village_Villeneuve_Trainstation", true, false)
		AIparts:RemovePeriodic("178. 14100 Attack Canadian Division Villeneuve")
	end
end

function func_179__15000_Attack_Canadian_Division_Villeneuve_()
	if GetGameTime() > 15000  then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Villeneuve_Trainstation", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 361*10, function()  UpdateGroupCounters("Canadian_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 365*10, function()  SendPlane("Player", "Douvres", "scout", "S", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 380*10, function()  mission.OutScreenMessage(100055, 10, "0xFFFF0000") end)
		AIparts:RemovePeriodic("179. 15000 Attack Canadian Division Villeneuve ")
	end
end

function func_180__15000_Attack_Canadian_Division_Villeneuve()
	if GetGameTime() > 14700  then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 325*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 345*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 365*10, function()  RunSpawn("Enemy", {"Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 385*10, function()  RunSpawn("Enemy", {"Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 405*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 425*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 445*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 460*10, function()  UpdateGroupCounters("Canadian_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 470*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Villeneuve_Trainstation", false, false) end)
		AIparts:RemovePeriodic("180. 15000 Attack Canadian Division Villeneuve")
	end
end

function func_182__15900_Attack_British_Collombelles()
	if GetGameTime() > 15645 then
		MoveGroupToZone("27th_Armoured", "Village_Lebisey", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 365*10, function()  RunSpawn("Enemy", {"British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 385*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 405*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 425*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 445*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 455*10, function()  MoveGroupToZone("3rd_Herouvillette", "Town_Collombelles", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 457*10, function()  UpdateGroupCounters("3rd_Herouvillette") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 460*10, function()  mission.OutScreenMessage(100056, 10, "0xFFFF0000") end)
		AIparts:RemovePeriodic("182. 15900 Attack British Collombelles")
	end
end

function func_185__16800_Attack_Canadian_Division_Carpiquet()
	if GetGameTime() > 16440 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 320*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 340*10, function()  RunSpawn("Enemy", {"Canadian_Firefly", "Canadian_Firefly", "Canadian_Firefly", "Canadian_Firefly", "Canadian_Firefly", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 360*10, function()  RunSpawn("Enemy", {"Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 380*10, function()  RunSpawn("Enemy", {"Canadian_Firefly", "Canadian_Firefly", "Canadian_Firefly", "Canadian_Firefly", "Canadian_Firefly", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 400*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 420*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 439*10, function()  UpdateGroupCounters("Canadian_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 440*10, function()  MoveGroupToZone("Canadian_3rd", "Airfield_Carpiquet", false, false) end)
		AIparts:RemovePeriodic("185. 16800 Attack Canadian Division Carpiquet")
	end
end

function func_903__British_Arty_present()
	if IsEventPresent("EvArtillery_present") and NumPlayerUnitsInZone("Player", "LZ_K") < 1 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"British_Supply", }, "Spawn_Artillery", "3rd_Supply", "3rd_Supply", false, false, {{dislocation="LZ_K_supply", }, }, false, 20) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  RunSpawn("Enemy", {"British_Supply", }, "Spawn_Artillery", "3rd_Supply", "3rd_Supply", false, false, {{dislocation="LZ_K_supply", }, }, false, 20) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  RunSpawn("Enemy", {"British_Supply", }, "Spawn_Artillery", "3rd_Supply", "3rd_Supply", false, false, {{dislocation="LZ_K_supply", }, }, false, 20) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Enemy", {"British_Supply", }, "Spawn_Artillery", "3rd_Supply", "3rd_Supply", false, false, {{dislocation="LZ_K", }, }, false, 20) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  SetGroupBehaviour("3rd_Supply", nil, nil, nil, nil, nil, true, true, nil, nil, nil) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 75*10, function()  SetGroupBehaviour("3rd_Artillery", nil, nil, nil, nil, nil, true, true, nil, nil, nil) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Enemy", {"British_5,5_inch", "British_5,5_inch", "British_5,5_inch", "British_5,5_inch", }, "Spawn_Artillery", "3rd_Artillery", "3rd_Artillery", false, false, {}, false, 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  mission.OutScreenMessage(100057, 15, "0xFFFF0000") end)
		AIparts:RemovePeriodic("903. British Arty present")
	end
end

function func_904__British_Arty_present()
	if NumGroupUnitsInZone("3rd_Artillery", "LZ_K") > 3 then
		SetGroupBehaviour("3rd_Artillery", nil, nil, nil, nil, nil, true, true, true, nil, nil)
		GroupAttackPlace("3rd_Artillery", "Caen_ArtilleryStrike", 250)
		AIparts:UpdatePeriodic("904. British Arty present", 600)
	end
end

function func_905__fortifications_empty()
	if GetGameTime() < 4800 and NumPlayerUnitsInZone("Player", "Beach_Quistreham_2") < 15 then
		SendPlane("Enemy", "Town_Quistreham_3", "scout", "N", 15, -1, "")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  mission.OutScreenMessage(100058, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  Bombardment("Town_Quistreham_3", 150, 16, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  Bombardment("Town_Quistreham_3", 150, 16, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  Bombardment("Town_Quistreham_3", 150, 16, 6, 30) end)
		AIparts:RemovePeriodic("905. fortifications empty")
	end
	if GetGameTime() < 4800 and NumPlayerUnitsInZone("Player", "Beach_Quistreham_1") < 15 then
		SendPlane("Enemy", "Town_Quistreham_3", "scout", "N", 15, -1, "")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  mission.OutScreenMessage(100058, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  Bombardment("Town_Quistreham_3", 150, 14, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  Bombardment("Town_Quistreham_3", 150, 14, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  Bombardment("Town_Quistreham_3", 150, 14, 6, 30) end)
		AIparts:RemovePeriodic("905. fortifications empty")
	end
end

function func_600__17700_Attack_Collombelles()
	if GetGameTime() > 17700 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  SendPlane("Player", "Beach_Franceville", "scout", "S", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  mission.OutScreenMessage(100052, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  MoveGroupToZone("3rd_Herouvillette", "Town_Collombelles", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  UnloadTransports("3rd_Herouvillette") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 110*10, function()  MoveGroupToZone("3rd_Herouvillette", "Town_Collombelles", false, false) end)
		AIparts:RemovePeriodic("600. 17700 Attack Collombelles")
	end
end

function func_601__17900_Attack_Collombelles()
	if GetGameTime() > 17900 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Ranville", "3rd_Herouvillette", "3rd_Herouvillette", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  MoveGroupToZone("3rd_Herouvillette", "Town_Collombelles", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  UnloadTransports("3rd_Herouvillette") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 110*10, function()  MoveGroupToZone("3rd_Herouvillette", "Town_Collombelles", false, false) end)
		AIparts:RemovePeriodic("601. 17900 Attack Collombelles")
	end
end

function func_602a__17900_Attack_Collombelles_Taken()
	if GetGameTime() > 17900 and NumGroupUnitsInZone("3rd_Herouvillette", "Town_Collombelles") > 1 then
		MoveGroupToZone("3rd_Herouvillette", "Caen_Trainstation", true, false)
		AIparts:RemovePeriodic("602a. 17900 Attack Collombelles Taken")
	end
end

function func_603__18600_Attack_Canadians_Airfield()
	if GetGameTime() > 18600 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  RunSpawn("Enemy", {"Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  RunSpawn("Enemy", {"Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  UpdateGroupCounters("Canadian_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 110*10, function()  MoveGroupToZone("Canadian_3rd", "Airfield_Carpiquet", false, false) end)
		AIparts:RemovePeriodic("603. 18600 Attack Canadians Airfield")
	end
end

function func_604__18600_Canadians_see_enemy()
	if GetGameTime() > 18600 and GroupSeeEnemyNow("Canadian_3rd") then
		UnloadTransports("Canadian_3rd")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Canadian_3rd", "Airfield_Carpiquet", false, true) end)
		AIparts:RemovePeriodic("604. 18600 Canadians see enemy")
	end
end

function func_605a__19200_Attack_Canadians_Airfield()
	if GetGameTime() > 19200 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  RunSpawn("Enemy", {"Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  RunSpawn("Enemy", {"Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  UpdateGroupCounters("Canadian_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 110*10, function()  MoveGroupToZone("Canadian_3rd", "Airfield_Carpiquet", false, false) end)
		AIparts:RemovePeriodic("605a. 19200 Attack Canadians Airfield")
	end
end

function func_605b__19200_Canadians_see_enemy()
	if GetGameTime() > 19200 and GroupSeeEnemyNow("Canadian_3rd") then
		UnloadTransports("Canadian_3rd")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Canadian_3rd", "Airfield_Carpiquet", false, true) end)
		AIparts:RemovePeriodic("605b. 19200 Canadians see enemy")
	end
end

function func_607__19200_Airfield_Carpiquet_taken__to_HQ21()
	if GetGameTime() > 19200 and NumPlayerUnitsInZone("Player", "Airfield_Carpiquet") < 1 and NumPlayerUnitsInZone("Enemy", "Airfield_Carpiquet") > 10 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  MoveGroupToZone("Canadian_3rd", "HQ_21", false, false) end)
		AIparts:RemovePeriodic("607. 19200 Airfield Carpiquet taken, to HQ21")
	end
end

function func_651__21600_Attack_Caen()
	if GetGameTime() > 21600 then
		RunSpawn("Enemy", {"British_Churchill_FT", "British_Churchill_FT", "British_Churchill_FT", "British_Churchill_FT", "British_Churchill_FT", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  RunSpawn("Enemy", {"British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  RunSpawn("Enemy", {"British_Centaur", "British_Centaur", "British_Centaur", "British_Centaur", "British_Centaur", "British_Centaur", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  RunSpawn("Enemy", {"British_Bren", "British_Bren", "British_Firefly", "British_Firefly", "British_Firefly", "British_Firefly", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  RunSpawn("Enemy", {"British_Stuart", "British_Stuart", "British_Stuart", "British_Stuart", "British_Stuart", "British_Stuart", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Enemy", {"British_Achilles", "British_Achilles", "British_Achilles", "British_Firefly", "British_Firefly", "British_Firefly", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  RunSpawn("Enemy", {"British_Sexton", "British_Sexton", "British_Sexton", "British_Sexton", "British_Sexton", "British_Sexton", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  RunSpawn("Enemy", {"British_Daimler", "British_Daimler", "British_Daimler", "British_Bren_FT", "British_Bren_FT", "British_Bren_FT", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 130*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 160*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 170*10, function()  SendPlane("Player", "LZ_W", "scout", "S", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 175*10, function()  RunSpawn("Enemy", {"British_Cromwell", "British_Cromwell", "British_Cromwell", "British_Firefly", "British_Firefly", "British_Firefly", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 180*10, function()  mission.OutScreenMessage(100059, 10, "0xFFFF0000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 195*10, function()  RunSpawn("Enemy", {"British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", }, "Spawn_Pegasus", "British_3rd", "British_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 210*10, function()  UpdateGroupCounters("British_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 220*10, function()  MoveGroupToZone("British_3rd", "Caen_North", false, false) end)
		AIparts:RemovePeriodic("651. 21600 Attack Caen")
	end
end

function func_652__21600_Attack_Caen_see_enemy()
	if GetGameTime() > 21600 and GroupSeeEnemyNow("British_3rd") then
		UnloadTransports("British_3rd")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("British_3rd", "Caen_North", false, false) end)
		AIparts:RemovePeriodic("652. 21600 Attack Caen see enemy")
	end
end

function func_653__21600_Attack_Caen_HQ21()
	if GetGameTime() > 21600 and NumPlayerUnitsInZone("Player", "Caen_North") < 5 and NumPlayerUnitsInZone("Enemy", "Caen_North") > 10 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("British_3rd", "HQ_21", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  mission.OutScreenMessage(100060, 10, "0xFFFF0000") end)
		AIparts:RemovePeriodic("653. 21600 Attack Caen HQ21")
	end
end

function func_654__22100_Attack_Caen_retreat()
	if GetGameTime() > 22100 and NumGroupUnits("British_3rd", 0, false, false, true) < 10 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("British_3rd", "Bridge_Pegasus", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  mission.OutScreenMessage(100061, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  SetEvent("EvCounterattack") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Merville", "3rd_Franceville", "3rd_Franceville", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Hermanville", "3rd_Quistreham", "3rd_Quistreham", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  MoveGroupToZone("3rd_Franceville", "Village_Franceville", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 47*10, function()  UpdateGroupCounters("3rd_Franceville") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  MoveGroupToZone("3rd_Quistreham", "Town_Quistreham_2", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 52*10, function()  UpdateGroupCounters("3rd_Quistreham") end)
		AIparts:RemovePeriodic("654. 22100 Attack Caen retreat")
	end
end

function func_700__Counterattack()
	if IsEventPresent("EvCounterattack") then
		AcivateObjective("Lion-sur-Mer2")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  AcivateObjective("Douvres_La_Delivrance2") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AcivateObjective("Ouistreham2") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  AcivateObjective("Franceville2") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  AcivateObjective("Pegasus_Bridge") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  AcivateObjective("LZ_K") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  RunSpawn("Player", {"German_SS_PanzerIV1", "German_SS_PanzerIV1", "German_SS_PanzerIV1", "German_SS_PanzerIV1", }, "To_Caen_East", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  mission.OutScreenMessage(100062, 15, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  RunSpawn("Player", {"German_SS_PanzerIV1", "German_SS_PanzerIV1", "German_SS_PanzerIV1", "German_SS_PanzerIV1", }, "To_Caen_East", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  RunSpawn("Player", {"German_SS_2511", "German_SS_2511", "German_SS_2511", "German_SS_2511", "German_SS_2511", "German_SS_2511", }, "To_Caen_East", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  AddBonus(1, 8, 3, -1, -1) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Player", {"German_SS_Munition1", "German_SS_Munition1", "German_21_Flamm", "German_21_Flamm", "German_SS_Fuel1", }, "To_Caen_East", "12_SS", "12_SS", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 85*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"Village_Franceville", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 87*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"Village_Douvres", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 89*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"Douvres", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 91*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"LionsurMer_1", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 93*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"LionsurMer_2", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 95*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"LionsurMer_3", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 97*10, function()  SpawnUnit("Units/Artillery/Antitank/british/17p_qf_mk_iv.dsc", "Enemy", {"LionsurMer_4", }, true) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 125*10, function()  MoveGroupToZone("Canadian_3rd", "Village_Douvres", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  UnloadTransports("Canadian_3rd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 145*10, function()  SetGroupBehaviour("Canadian_3rd", true, true, nil, nil, nil, nil, true, nil, true, nil) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 365*10, function()  mission.OutScreenMessage(100074, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 370*10, function()  RunSpawn("Player", {"German_16_Feld", "German_16_Feld", "German_16_Feld", "German_16_Feld", }, "16_Feld", "16_Feld", "16_Feld", true, true, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 450*10, function()  UpdateGroupCounters("16_Feld") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 460*10, function()  SetEvent("Ev16Feld") end)
		AIparts:RemovePeriodic("700. Counterattack")
	end
end

function func_701__Obj__LZ_K_taken()
	if IsEventPresent("EvCounterattack") and NumPlayerUnitsInZone("Enemy", "LZ_K") < 1 and NumPlayerUnitsInZone("Player", "LZ_K") > 1 and IsObjectiveActive("LZ_K") then
		SetObjectiveComplete("LZ_K", "Player")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100065, 5, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  AddBonus(1, 8, 1, -1, -1) end)
		AIparts:RemovePeriodic("701. Obj. LZ_K taken")
	end
end

function func_702__Obj__Pegasus_Bridge_taken()
	if IsEventPresent("EvCounterattack") and NumPlayerUnitsInZone("Enemy", "Bridge_Pegasus") < 1 and NumPlayerUnitsInZone("Player", "Bridge_Pegasus") > 1 and IsObjectiveActive("Pegasus_Bridge") then
		SetObjectiveComplete("Pegasus_Bridge", "Player")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100066, 5, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  AddBonus(1, 8, 1, -1, -1) end)
		AIparts:RemovePeriodic("702. Obj. Pegasus Bridge taken")
	end
end

function func_703__Obj__Franceville_taken()
	if IsEventPresent("EvCounterattack") and NumPlayerUnitsInZone("Enemy", "Village_Franceville") < 1 and NumPlayerUnitsInZone("Player", "Village_Franceville") > 1 and IsObjectiveActive("Franceville2") then
		SetObjectiveComplete("Franceville2", "Player")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100067, 5, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  AddBonus(1, 8, 1, -1, -1) end)
		AIparts:RemovePeriodic("703. Obj. Franceville taken")
	end
end

function func_704__Obj__Ouistreham_taken()
	if IsEventPresent("EvCounterattack") and NumPlayerUnitsInZone("Enemy", "Town_Quistreham_2") < 1 and NumPlayerUnitsInZone("Player", "Town_Quistreham_2") > 1 and IsObjectiveActive("Ouistreham2") then
		SetObjectiveComplete("Ouistreham2", "Player")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100068, 5, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  AddBonus(1, 8, 1, -1, -1) end)
		AIparts:RemovePeriodic("704. Obj. Ouistreham taken")
	end
end

function func_705__Obj__Dourvres_taken()
	if IsEventPresent("EvCounterattack") and NumPlayerUnitsInZone("Enemy", "Village_Douvres") < 1 and NumPlayerUnitsInZone("Player", "Village_Douvres") > 1 and IsObjectiveActive("Douvres_La_Delivrance2") then
		SetObjectiveComplete("Douvres_La_Delivrance2", "Player")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100069, 5, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  AddBonus(1, 8, 1, -1, -1) end)
		AIparts:RemovePeriodic("705. Obj. Dourvres taken")
	end
end

function func_706__Obj__Lion_sur_Mer_taken()
	if IsEventPresent("EvCounterattack") and NumPlayerUnitsInZone("Enemy", "Village_LionsurMer") < 1 and NumPlayerUnitsInZone("Player", "Village_LionsurMer") > 1 and IsObjectiveActive("Lion-sur-Mer2") then
		SetObjectiveComplete("Lion-sur-Mer2", "Player")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100070, 5, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  AddBonus(1, 8, 1, -1, -1) end)
		AIparts:RemovePeriodic("706. Obj. Lion-sur-Mer taken")
	end
end

function func_606a__20500_Attack_Caen_East()
	if GetGameTime() > 20500 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  RunSpawn("Enemy", {"British_Bren", "British_Bren", "British_Bren", "British_Bren_FT", "British_Bren_FT", }, "Spawn_Ranville", "Caen_East", "Caen_East", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  RunSpawn("Enemy", {"British_Daimler", "British_Daimler", "British_Daimler", "British_Halftrack", "British_Halftrack", }, "Spawn_Ranville", "Caen_East", "Caen_East", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  RunSpawn("Enemy", {"British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", }, "Spawn_Ranville", "Caen_East", "Caen_East", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 55*10, function()  MoveGroupToZone("Caen_East", "Caen_East", false, false) end)
		AIparts:RemovePeriodic("606a. 20500 Attack Caen_East")
	end
end

function func_606b__20500_Attack_Caen_East()
	if GetGameTime() > 20500 and GroupSeeEnemyNow("Caen_East") then
		UnloadTransports("Caen_East")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Caen_East", "Caen_East", false, false) end)
		AIparts:RemovePeriodic("606b. 20500 Attack Caen_East")
	end
end

function func_606c__20500_Attack_Trainstation()
	if GetGameTime() > 20500 and NumGroupUnitsInZone("Caen_East", "Caen_East") > 0 and NumPlayerUnitsInZone("Player", "Caen_East") < 1 then
		UnloadTransports("Caen_East")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Caen_East", "Caen_Trainstation", false, false) end)
		AIparts:RemovePeriodic("606c. 20500 Attack Trainstation")
	end
end

function func_655__Franceville_()
	if GetGameTime() > 21800 and NumGroupUnitsInZone("3rd_Franceville", "Village_Franceville") > 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  UnloadTransports("3rd_Franceville") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  SetGroupBehaviour("3rd_Franceville", true, nil, nil, nil, nil, nil, nil, nil, nil, nil) end)
		AIparts:RemovePeriodic("655. Franceville ")
	end
end

function func_656__Ouistreham()
	if GetGameTime() > 21800 and NumGroupUnitsInZone("3rd_Quistreham", "Town_Quistreham_2") > 3 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  UnloadTransports("3rd_Quistreham") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  SetGroupBehaviour("3rd_Quistreham", true, nil, nil, nil, nil, nil, nil, nil, nil, nil) end)
		AIparts:RemovePeriodic("656. Ouistreham")
	end
end

function func_657__Pegasus()
	if IsEventPresent("EvCounterattack") and NumPlayerUnitsInZone("Player", "Bridge_Pegasus") > 3 then
		RunSpawn("Enemy", {"British_Firefly", "British_Firefly", "British_Firefly", "British_Firefly", "British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", }, "Spawn_Pegasus", "3rd_Firefly", "3rd_Firefly", false, false, {}, false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Pegasus", "3rd_Firefly", "3rd_Firefly", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  UnloadTransports("3rd_Firefly") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 57*10, function()  mission.OutScreenMessage(100072, 5, "0xFF000000") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  SetEvent("EvPegasus") end)
		AIparts:RemovePeriodic("657. Pegasus")
	end
end

function func_658__Pegasus_redraw___counterattack()
	if IsEventPresent("EvPegasus") and NumGroupUnits("3rd_Firefly", 0, false, false, false) > 0 and NumPlayerUnitsInZone("Player", "Bridge_Pegasus") > 3 then
		MoveGroupToZone("3rd_Firefly", "Bridge_Pegasus", true, false)
	end
	if IsEventPresent("EvPegasus") and NumGroupUnits("3rd_Firefly", 0, false, false, false) > 0 and NumPlayerUnitsInZone("Player", "Bridge_Pegasus") < 1 then
		MoveGroupToZone("3rd_Firefly", "Counter_Pegasus", false, false)
	end
end

function func_707__2nd_reinforcement_16_feld()
	if IsEventPresent("Ev16Feld") and NumGroupUnits("16_Feld", 0, false, false, true) < 20 then
		RunSpawn("Player", {"German_16_Feld", "German_16_Feld", "German_16_Feld", }, "16_Feld", "16_Feld", "16_Feld", true, true, {}, false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100074, 10, "0xFF00CC00") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  AddBonus(1, 8, 1, -1, -1) end)
		AIparts:RemovePeriodic("707. 2nd reinforcement 16 feld")
	end
end

function func_001c__Meyer_is_dead()
	if GetGameTime() > 10800 and GetGameTime() < 22000 and IsEventPresent("EvMeyerKilled") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Enemy", {"British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", "British_Sherman_III", }, "Spawn_Hermanville", "1_Meyer_troops", "1_Meyer_troops", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Enemy", {"British_Achilles", "British_Achilles", "British_Cromwell", "British_Cromwell", "British_Cromwell", }, "Spawn_Hermanville", "1_Meyer_troops", "1_Meyer_troops", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  RunSpawn("Enemy", {"British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", "British_Halftrack", }, "Spawn_Hermanville", "1_Meyer_troops", "1_Meyer_troops", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  MoveGroupToZone("1_Meyer_troops", "HQ_21", false, false) end)
		AIparts:RemovePeriodic("001c. Meyer is dead")
	end
end

function func_002c__Feuchtinger_is_dead()
	if GetGameTime() > 10800 and GetGameTime() < 22000 and IsEventPresent("EvFeuchtingerKilled") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Enemy", {"Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", }, "Canadian_3rd", "2_Feuchtinger_troops", "2_Feuchtinger_troops", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "2_Feuchtinger_troops", "2_Feuchtinger_troops", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "2_Feuchtinger_troops", "2_Feuchtinger_troops", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  MoveGroupToZone("2_Feuchtinger_troops", "HQ_21", false, false) end)
		AIparts:RemovePeriodic("002c. Feuchtinger is dead")
	end
end

function func_003c__Richter_is_dead()
	if GetGameTime() > 10800 and GetGameTime() < 22000 and IsEventPresent("EvRichterKilled") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Enemy", {"Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", "Canadian_shermanII", }, "Canadian_3rd", "3_Richter_troops", "3_Richter_troops", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Enemy", {"Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", "Canadian_M10", }, "Canadian_3rd", "3_Richter_troops", "3_Richter_troops", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "3_Richter_troops", "3_Richter_troops", false, false, {}, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  MoveGroupToZone("3_Richter_troops", "HQ_21", false, false) end)
		AIparts:RemovePeriodic("003c. Richter is dead")
	end
end

function func_003d__Richter_is_dead_unload_()
	if GroupSeeEnemyNow("3_Richter_troops") then
		UnloadTransports("3_Richter_troops")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("3_Richter_troops", "HQ_21", false, false) end)
		AIparts:RemovePeriodic("003d. Richter is dead unload ")
	end
end

function func_002d__Feuchtinger_is_dead_unload()
	if GroupSeeEnemyNow("2_Feuchtinger_troops") then
		UnloadTransports("2_Feuchtinger_troops")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("2_Feuchtinger_troops", "HQ_21", false, false) end)
		AIparts:RemovePeriodic("002d. Feuchtinger is dead unload")
	end
end

function func_001d__Meyer_is_dead_unload()
	if GroupSeeEnemyNow("1_Meyer_troops") then
		UnloadTransports("1_Meyer_troops")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("1_Meyer_troops", "HQ_21", false, false) end)
		AIparts:RemovePeriodic("001d. Meyer is dead unload")
	end
end

function func_124b__Landing_LucsurMer()
	if GetGameTime() > 5050 then
		RunSpawn("Enemy", {"British_lcm_Churchill_FT", }, "Landing_LucsurMer", "Landingboats", "3rd_LucsurMer", false, false, {{unload=true, }, {dislocation="Beach_LucsurMer_Out", }, {disappear=true, }, }, false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  MoveGroupToZone("3rd_LucsurMer", "Village_LucsurMer", true, false) end)
		AIparts:RemovePeriodic("124b. Landing_LucsurMer")
	end
end

function func_001e__Meyer_not_arrived()
	if IsEventPresent("EvKubelwagenArrived2") and not IsEventPresent("EvMeyerArrived") then
		MoveGroupToZone("12_SSA", "HQ_12SS", false, false)
		AIparts:RemovePeriodic("001e. Meyer not arrived")
	end
end

function func_000__A_Start()
	if GetGameTime() > 1 then
		mission.OutScreenMessage(100101, 6, "0xFF000000")
		AIparts:RemovePeriodic("000. A_Start")
	end
end

function func_141b__21pzr_at_Douvres()
	if GetGameTime() > 9900 and GetGameTime() < 10000 and NumPlayerUnitsInZone("Player", "Village_Douvres") > 0 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  SendPlane("Enemy", "Village_Douvres", "scout", "N", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  RunSpawn("Enemy", {"Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", "Canadian_Halftrack", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {{attack_place="Douvres", }, }, false, 100) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Canadian_Cromwell", "Canadian_Cromwell", "Canadian_Cromwell", "Canadian_Firefly", "Canadian_Firefly", }, "Canadian_3rd", "Canadian_3rd", "Canadian_3rd", false, false, {{attack_place="Douvres", }, }, false, 100) end)
		AIparts:RemovePeriodic("141b. 21pzr at Douvres")
	end
end

function func_141c__21pzr_at_Douvres_()
	if GetGameTime() > 9900 and NumPlayerUnitsInZone("Player", "Village_Douvres") > 0 and GroupSeeEnemyNow("Canadian_3rd") then
		UnloadTransports("Canadian_3rd")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  GroupAttackPlace("Canadian_3rd", "Douvres", 100) end)
		AIparts:RemovePeriodic("141c. 21pzr at Douvres ")
	end
end

function func_950__unload()
	if GroupSeeEnemyNow("British_3rd") then
		UnloadTransports("British_3rd")
	end
	if GroupSeeEnemyNow("Canadian_3rd") then
		UnloadTransports("Canadian_3rd")
	end
	if GroupSeeEnemyNow("3rd_Herouvillette") then
		UnloadTransports("3rd_Herouvillette")
	end
	if GroupSeeEnemyNow("27th_Armoured") then
		UnloadTransports("27th_Armoured")
	end
end

function func_074__Villeneuve_taken()
	if NumPlayerUnitsInZone("Player", "Village_Villeneuve_Trainstation") < 1 and NumPlayerUnitsInZone("Enemy", "Village_Villeneuve_Trainstation") > 0 then
		MoveGroupToZone("Canadian_3rd", "Airfield_Carpiquet", true, false)
		AIparts:RemovePeriodic("074. Villeneuve taken")
	end
end

function func_183_15900_Attack_Collombelles_Taken()
	if GetGameTime() > 15900 and NumGroupUnitsInZone("3rd_Herouvillette", "Town_Collombelles") > 1 then
		MoveGroupToZone("3rd_Herouvillette", "Caen_Trainstation", true, false)
		AIparts:RemovePeriodic("183.15900 Attack Collombelles Taken")
	end
end

function func_184__15900_Attack_HQ_21()
	if GetGameTime() > 15900 and NumGroupUnitsInZone("3rd_Herouvillette", "Caen_Trainstation") > 1 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  MoveGroupToZone("3rd_Herouvillette", "Caen_Trainstation", true, false) end)
		AIparts:RemovePeriodic("184. 15900 Attack HQ 21")
	end
end

function func_602b__17900_Attack_HQ_21()
	if GetGameTime() > 17900 and NumGroupUnitsInZone("3rd_Herouvillette", "Caen_Trainstation") > 1 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  MoveGroupToZone("3rd_Herouvillette", "Caen_Trainstation", true, false) end)
		AIparts:RemovePeriodic("602b. 17900 Attack HQ 21")
	end
end

function func_975__Pegasus_Bridge()
	if GetGameTime() < 7200 and NumGroupUnitsInZone("21_Pzr_repair", "Bridge_Pegasus") > 0 then
		RunSpawn("Enemy", {"British_Firefly", "British_Firefly", "British_Firefly", "British_Firefly", "British_Achilles", "British_Achilles", "British_Achilles", "British_Achilles", }, "Spawn_Pegasus", "Pegasus_tanks", "Pegasus_tanks", false, false, {}, false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  MoveGroupToZone("Pegasus_tanks", "Bridge_Pegasus", true, false) end)
		AIparts:RemovePeriodic("975. Pegasus Bridge")
	end
end

