./_a_ga_dt_03.lua

  1.  
  2. --[[ 
  3. 	_A_GA_DT_03.lua 
  4. 	SR3 Activity Script 
  5. 	DATE: 10/05/10 
  6. 	AUTHOR:	Anne Chilldon 
  7. 				Ryan Slack 
  8. ]]-- 
  9.  
  10. -- ************************* 
  11. -- 
  12. -- Data Parameters 
  13. -- 
  14. -- ************************* 
  15.  
  16. -- Add/modify the data below to match the activity instance. 
  17. -- Do a find/replace on [change_to_activity_name] and replace it with the name of this 
  18. -- instance of Guardian Angel. 
  19.  
  20. -- Debug flags -- 
  21.  
  22. -- Tweakable Parameters -- 
  23. 	_A_GA_DT_03_tweak_params = { 
  24. 		car_speed_override       = 60.0, 
  25. 		heli_follow_dist         = 25.0, 
  26. 		notoriety_team           = "", 
  27. 		notoriety_min_level      = 4, 
  28. 		notoriety_max_level      = 5, 
  29. 		sniper_weapon_slot       = WEAPON_SLOT_SPECIAL, 
  30. 		rpg_weapon_slot          = WEAPON_SLOT_EXPLOSIVE, 
  31. 	} 
  32.  
  33. -- Groups -- 
  34.  
  35. 	_A_GA_DT_03_groups = { 
  36. 		protectees = { 
  37. 			name = "ga_dt3_protectee_group", 
  38. 			chars = { "npc_Pierce" }, 
  39. 			vehicle = "veh_PierceCar", 
  40. 		}, 
  41. 		heli_group = { 
  42. 			name = "ga_dt3_heli_group", 
  43. 			chars = { "npc_Heli_Pilot" }, 
  44. 			vehicle = "veh_Player_heli", 
  45. 		}, 
  46. 		roadblock1 = { 
  47. 			name = "ga_dt3_attack1", 
  48. 			chars = { "npc_attack1 001", "npc_attack1 002", "npc_attack1 003", 
  49. 					  "npc_attack1 004", "npc_attack1 005", "npc_attack1 006" }, 
  50. 			vehicle = { "veh_attack1 001", "veh_attack1 002" }, 
  51. 		}, 
  52. 		roadblock2 = { 
  53. 			name = "ga_dt3_attack2", 
  54. 			chars = { "npc_attack2 001", "npc_attack2 002", "npc_attack2 003", 
  55. 					  "npc_attack2 004", "npc_attack2 005", "npc_attack2 006" }, 
  56. 			vehicle = { "veh_attack2 001", "veh_attack2 002" }, 
  57. 		}, 
  58. 		chase1 = { 
  59. 			name = "ga_dt3_chase1", 
  60. 			chars = { "npc_chase1 001", "npc_chase1 002" }, 
  61. 			vehicle = { "veh_chase1" }, 
  62. 		}, 
  63. 		chase2 = { 
  64. 			name = "ga_dt3_chase2", 
  65. 			chars = { "npc_chase2 001", "npc_chase2 002" }, 
  66. 			vehicle = { "veh_chase2" }, 
  67. 		}, 
  68. 		chase3 = { 
  69. 			name = "ga_dt3_chase3", 
  70. 			chars = { "npc_chase3 001", "npc_chase3 002" }, 
  71. 			vehicle = { "veh_chase3" }, 
  72. 		}, 
  73. 		chase4 = { 
  74. 			name = "ga_dt3_chase4", 
  75. 			chars = { "npc_chase4 001", "npc_chase4 002" }, 
  76. 			vehicle = { "veh_chase4" }, 
  77. 		}, 
  78. 		chase5 = { 
  79. 			name = "ga_dt3_chase5", 
  80. 			chars = { "npc_chase5 001", "npc_chase5 002" }, 
  81. 			vehicle = { "veh_chase5" }, 
  82. 		}, 
  83. 		chase6 = { 
  84. 			name = "ga_dt3_chase6", 
  85. 			chars = { "npc_chase6 001", "npc_chase6 002" }, 
  86. 			vehicle = { "veh_chase6" }, 
  87. 		}, 
  88. 		chase7 = { 
  89. 			name = "ga_dt3_chase7", 
  90. 			chars = { "npc_chase7 001", "npc_chase7 002" }, 
  91. 			vehicle = { "veh_chase7" }, 
  92. 		}, 
  93. 		chase8 = { 
  94. 			name = "ga_dt3_chase8", 
  95. 			chars = { "npc_chase8 001", "npc_chase8 002" }, 
  96. 			vehicle = { "veh_chase8" }, 
  97. 		}, 
  98. 		chase9 = { 
  99. 			name = "ga_dt3_chase9", 
  100. 			chars = { "npc_chase9 001", "npc_chase9 002" }, 
  101. 			vehicle = { "veh_chase9" }, 
  102. 		}, 
  103. 		chase10 = { 
  104. 			name = "ga_dt3_chase10", 
  105. 			chars = { "npc_chase10 001", "npc_chase10 002" }, 
  106. 			vehicle = { "veh_chase10" }, 
  107. 		}, 
  108. 		chase11 = { 
  109. 			name = "ga_dt3_chase11", 
  110. 			chars = { "npc_chase11 001", "npc_chase11 002" }, 
  111. 			vehicle = { "veh_chase11" }, 
  112. 		}, 
  113. 		chase12 = { 
  114. 			name = "ga_dt3_chase12", 
  115. 			chars = { "npc_chase12 001", "npc_chase12 002" }, 
  116. 			vehicle = { "veh_chase12" }, 
  117. 		}, 
  118. 		chase13 = { 
  119. 			name = "ga_dt3_chase13", 
  120. 			chars = { "npc_chase13 001", "npc_chase13 002" }, 
  121. 			vehicle = { "veh_chase13" }, 
  122. 		}, 
  123. 		chase14 = { 
  124. 			name = "ga_dt3_chase14", 
  125. 			chars = { "npc_chase14 001", "npc_chase14 002" }, 
  126. 			vehicle = { "veh_chase14" }, 
  127. 		}, 
  128. 		chase15 = { 
  129. 			name = "ga_dt3_chase15", 
  130. 			chars = { "npc_chase15 001", "npc_chase15 002" }, 
  131. 			vehicle = { "veh_chase15" }, 
  132. 		}, 
  133. 		chase16 = { 
  134. 			name = "ga_dt3_chase16", 
  135. 			chars = { "npc_chase16 001", "npc_chase16 002" }, 
  136. 			vehicle = { "veh_chase16" }, 
  137. 		}, 
  138. 		chase17 = { 
  139. 			name = "ga_dt3_chase17", 
  140. 			chars = { "npc_chase17 001", "npc_chase17 002" }, 
  141. 			vehicle = { "veh_chase17" }, 
  142. 		}, 
  143. 		chase18 = { 
  144. 			name = "ga_dt3_chase18", 
  145. 			chars = { "npc_chase18 001", "npc_chase18 002" }, 
  146. 			vehicle = { "veh_chase18" }, 
  147. 		}, 
  148. 		chase19 = { 
  149. 			name = "ga_dt3_chase19", 
  150. 			chars = { "npc_chase19 001", "npc_chase19 002" }, 
  151. 			vehicle = { "veh_chase19" }, 
  152. 		}, 
  153. 		chase20 = { 
  154. 			name = "ga_dt3_chase20", 
  155. 			chars = { "npc_chase20 001", "npc_chase20 002" }, 
  156. 			vehicle = { "veh_chase20" }, 
  157. 		}, 
  158. 		chase21 = { 
  159. 			name = "ga_dt3_chase21", 
  160. 			chars = { "npc_chase21 001", "npc_chase21 002" }, 
  161. 			vehicle = { "veh_chase21" }, 
  162. 		}, 
  163. 		attack_heli = { 
  164. 			name = "ga_dt3_attack_heli", 
  165. 			chars = { "npc_attack_heli_pilot", "npc_attack_heli_sniper" }, 
  166. 			vehicle = { "veh_attack_heli" }, 
  167. 		}, 
  168. 	} 
  169.  
  170. -- Navpoints -- 
  171. 	_A_GA_DT_03_navs = { 
  172. 		local_rappel_point = "Player_Pos2", 
  173. 		remote_rappel_point = "Coop_Pos2", 
  174. 		camera_pos = "camera_pos", 
  175. 		node3 = "Node 3", 
  176. 	} 
  177.  
  178. -- Paths -- 
  179.  
  180. 	_A_GA_DT_03_paths = { 
  181. 		hover_path = "Hover_Path", 
  182. 		heli_path1a = "Heli1a_Path", 
  183. 		heli_path1b = "Heli1b_Path", 
  184. 		heli_path1c = "Heli1c_Path", 
  185. 		heli_path1d = "Heli1d_Path", 
  186. 		heli_path2a = "Heli2a_Path", 
  187. 		heli_path2b = "Heli2b_Path", 
  188. 		heli_path2c = "Heli2c_Path", 
  189. 		heli_path3 = "Heli3_Path", 
  190. 		heli_path4a = "Heli4a_Path", 
  191. 		heli_path4b = "Heli4b_Path", 
  192. 		heli_path5 = "Heli5_Path", 
  193. 		heli_path6 = "Heli6_Path", 
  194. 		heli_goal_direction = "Heli_End_Orient", 
  195. 		car_path1a = "Car1a_Path", 
  196. 		car_path1b = "Car1b_Path", 
  197. 		car_path1c = "Car1c_Path", 
  198. 		car_path1d = "Car1d_Path", 
  199. 		car_path2a = "Car2a_Path", 
  200. 		car_path2b = "Car2b_Path", 
  201. 		car_path2c = "Car2c_Path", 
  202. 		car_path3 = "Car3_Path", 
  203. 		car_path4a = "Car4a_Path", 
  204. 		car_path4b = "Car4b_Path", 
  205. 		car_path5 = "Car5_Path", 
  206. 		car_path6 = "Car6_Path", 
  207. 		car_path7 = "Car7_Path", 
  208. 		car_path8a = "Car8a_Path", 
  209. 		car_path8b = "Car8b_Path", 
  210. 		car_path8c = "Car8c_Path", 
  211. 		car_path9a = "Car9a_Path", 
  212. 		car_path9b = "Car9b_Path", 
  213. 		car_path9c = "Car9c_Path", 
  214. 		attack_heli = "attack_heli_path", 
  215. 	} 
  216. 	 
  217. 	 
  218. -- Triggers -- 
  219.  
  220. -- Characters -- 
  221.  
  222. -- Vehicles -- 
  223.  
  224. -- Mesh Movers -- 
  225.  
  226. -- Text -- 
  227.  
  228. -- Threads -- 
  229. 	_A_GA_DT_03_threads = { 
  230. 		activity_thread = -1, 
  231. 		driving1_thread = -1, 
  232. 		driving2_thread = -1, 
  233. 		driving3_thread = -1, 
  234. 		flying1_thread = -1, 
  235. 		flying2_thread = -1, 
  236. 		flying3_thread = -1, 
  237. 		intro_chase1_thread = -1, 
  238. 		intro_chase2_thread = -1, 
  239. 	} 
  240.  
  241. -- Checkpoints -- 
  242. 	 
  243. -- Cutscenes -- 
  244.  
  245. -- Other -- 
  246. 	_A_GA_DT_03_flags = { 
  247. 		activity_thread_complete = false, 
  248. 		driving1_thread_complete = false, 
  249. 		driving2_thread_complete = false, 
  250. 		driving3_thread_complete = false, 
  251. 		flying1_thread_complete = false, 
  252. 		flying2_thread_complete = false, 
  253. 		flying3_thread_complete = false, 
  254. 		indicators_enabled_after_rappel = false, 
  255. 	} 
  256. 	 
  257. 	_A_GA_DT_03_chase = {	 
  258. 		section_01 = {  
  259. 			vehicle_path = "", 
  260. 			heli_path = "", 
  261. 			use_navmesh = true, 
  262. 		}, 
  263. 	} 
  264. 	 
  265. -- ************************* 
  266. -- 
  267. -- Required Functions 
  268. -- 
  269. -- ************************* 
  270.  
  271. -- These functions are required for the activity to run correctly. 
  272. -- They can be customized but they should function as outlined in the comments. 
  273.  
  274. -- This is called during the activity setup.  This should be used to spawn any required 
  275. -- script_groups/npcs/vehicles or other required setup the lua will require later. 
  276. -- CALLED FROM CODE 
  277. -- 
  278. -- level_num = The level to start for this instance of guardian angel. 
  279. --  
  280. function _A_GA_DT_03_start(level_num) 
  281. 	-- Handle any initialization 
  282.  
  283. 	if (level_num == 1) then 
  284. 		-- Handle starting up level 1 for this activity instance 
  285. 		_A_GA_DT_03_start_lvl_1() 
  286. 	end 
  287. 	 
  288. end 
  289.  
  290. -- This is the primary function responsible for cleaning up the entire activity 
  291. -- CALLED FROM CODE 
  292. -- 
  293. function _A_GA_DT_03_cleanup( ) 
  294. 	guardian_angel_clear_zone_pinning() 
  295. 	-- Handle any cleanup 
  296. 	if (group_is_loaded(_A_GA_DT_03_groups.heli_group.name))then 
  297. 		group_destroy(_A_GA_DT_03_groups.heli_group.name) 
  298. 	end 
  299. 	if (group_is_loaded(_A_GA_DT_03_groups.roadblock1.name))then 
  300. 		group_destroy(_A_GA_DT_03_groups.roadblock1.name) 
  301. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.roadblock1.name) 
  302. 	end 
  303. 	if (group_is_loaded(_A_GA_DT_03_groups.roadblock2.name))then 
  304. 		group_destroy(_A_GA_DT_03_groups.roadblock2.name) 
  305. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.roadblock2.name) 
  306. 	end 
  307. 	if (group_is_loaded(_A_GA_DT_03_groups.chase1.name))then 
  308. 		group_destroy(_A_GA_DT_03_groups.chase1.name) 
  309. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase1.name) 
  310. 	end 
  311. 	if (group_is_loaded(_A_GA_DT_03_groups.chase2.name))then 
  312. 		group_destroy(_A_GA_DT_03_groups.chase2.name) 
  313. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase2.name) 
  314. 	end 
  315. 	if(group_is_loaded(_A_GA_DT_03_groups.chase3.name))then 
  316. 		group_destroy(_A_GA_DT_03_groups.chase3.name) 
  317. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase3.name) 
  318. 	end 
  319. 	if(group_is_loaded(_A_GA_DT_03_groups.chase4.name))then 
  320. 		group_destroy(_A_GA_DT_03_groups.chase4.name) 
  321. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase4.name) 
  322. 	end 
  323. 	if(group_is_loaded(_A_GA_DT_03_groups.chase5.name))then 
  324. 		group_destroy(_A_GA_DT_03_groups.chase5.name) 
  325. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase5.name) 
  326. 	end 
  327. 	if(group_is_loaded(_A_GA_DT_03_groups.chase6.name))then 
  328. 		group_destroy(_A_GA_DT_03_groups.chase6.name) 
  329. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase6.name) 
  330. 	end 
  331. 	if(group_is_loaded(_A_GA_DT_03_groups.chase7.name))then 
  332. 		group_destroy(_A_GA_DT_03_groups.chase7.name) 
  333. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase7.name) 
  334. 	end 
  335. 	if(group_is_loaded(_A_GA_DT_03_groups.chase8.name))then 
  336. 		group_destroy(_A_GA_DT_03_groups.chase8.name) 
  337. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase8.name) 
  338. 	end 
  339. 	if(group_is_loaded(_A_GA_DT_03_groups.chase9.name))then 
  340. 		group_destroy(_A_GA_DT_03_groups.chase9.name) 
  341. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase9.name) 
  342. 	end 
  343. 	if(group_is_loaded(_A_GA_DT_03_groups.chase10.name))then 
  344. 		group_destroy(_A_GA_DT_03_groups.chase10.name) 
  345. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase10.name) 
  346. 	end 
  347. 	if(group_is_loaded(_A_GA_DT_03_groups.chase11.name))then 
  348. 		group_destroy(_A_GA_DT_03_groups.chase11.name) 
  349. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase11.name) 
  350. 	end 
  351. 	if(group_is_loaded(_A_GA_DT_03_groups.chase12.name))then 
  352. 		group_destroy(_A_GA_DT_03_groups.chase12.name) 
  353. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase12.name) 
  354. 	end 
  355. 	if(group_is_loaded(_A_GA_DT_03_groups.chase13.name))then 
  356. 		group_destroy(_A_GA_DT_03_groups.chase13.name) 
  357. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase13.name) 
  358. 	end 
  359. 	if(group_is_loaded(_A_GA_DT_03_groups.chase14.name))then 
  360. 		group_destroy(_A_GA_DT_03_groups.chase14.name) 
  361. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase14.name) 
  362. 	end 
  363. 	if(group_is_loaded(_A_GA_DT_03_groups.chase15.name))then 
  364. 		group_destroy(_A_GA_DT_03_groups.chase15.name) 
  365. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase15.name) 
  366. 	end 
  367. 	if(group_is_loaded(_A_GA_DT_03_groups.chase16.name))then 
  368. 		group_destroy(_A_GA_DT_03_groups.chase16.name) 
  369. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase16.name) 
  370. 	end 
  371. 	if(group_is_loaded(_A_GA_DT_03_groups.chase17.name))then 
  372. 		group_destroy(_A_GA_DT_03_groups.chase17.name) 
  373. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase17.name) 
  374. 	end 
  375. 	if(group_is_loaded(_A_GA_DT_03_groups.chase18.name))then 
  376. 		group_destroy(_A_GA_DT_03_groups.chase18.name) 
  377. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase18.name) 
  378. 	end 
  379. 	if(group_is_loaded(_A_GA_DT_03_groups.chase19.name))then 
  380. 		group_destroy(_A_GA_DT_03_groups.chase19.name) 
  381. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase19.name) 
  382. 	end 
  383. 	if(group_is_loaded(_A_GA_DT_03_groups.chase20.name))then 
  384. 		group_destroy(_A_GA_DT_03_groups.chase20.name) 
  385. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase20.name) 
  386. 	end 
  387. 	if(group_is_loaded(_A_GA_DT_03_groups.chase21.name))then 
  388. 		group_destroy(_A_GA_DT_03_groups.chase21.name) 
  389. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase21.name) 
  390. 	end 
  391. 	if(group_is_loaded(_A_GA_DT_03_groups.attack_heli.name))then 
  392. 		group_destroy(_A_GA_DT_03_groups.attack_heli.name) 
  393. 		guardian_angel_unregister_script_group(_A_GA_DT_03_groups.attack_heli.name) 
  394. 	end 
  395. 	-- Cleanup any existing threads. 
  396. 	for i, thread in pairs(_A_GA_DT_03_threads) do 
  397. 		if ((thread ~= -1) and (thread_check_done(thread) == false)) then 
  398. 			thread_kill(thread) 
  399. 		end 
  400. 	end 
  401. 	helicopters_set_jitter_override() 
  402. 	on_vehicle_destroyed("", _A_GA_DT_03_groups.protectees.vehicle) 
  403. end 
  404.  
  405. -- ************************* 
  406. -- 
  407. -- Callback functions 
  408. -- 
  409. -- ************************* 
  410.  
  411. -- 
  412. -- Lua processing start - These are the functions you reference in the table file to 
  413. --                         start scripting. 
  414. -- 
  415.  
  416. -- Called from code to start lua processing. 
  417. -- IMPORTANT: This should only call the "main" function as a new thread and immediately 
  418. --             return true.  Doing anything else will break the activity. 
  419. -- 
  420. function _A_GA_DT_03_start_instance() 
  421. 	-- Kick off a thread to process the entire car chase sequence 
  422. 	_A_GA_DT_03_threads.activity_thread = thread_new("_A_GA_DT_03_thread_process_activity") 
  423.  
  424. 	-- Return true so the activity can continue 
  425. 	return true 
  426. end 
  427.  
  428. -- 
  429. -- Progress Checks - These are how the activity instance knows if lua is complete. 
  430. --                    Whenever a thread completes, it should mark a bool in 
  431. --                    _A_GA_DT_03_flags to true.  These functions 
  432. --                    should only return that bool, as anything else could hold 
  433. --                    up processing. 
  434. -- 
  435.  
  436. -- Called from code to check if the chase seqeunce has completed 
  437. -- IMPORTANT: Do nothing but return the bool that contains the status you are checking. 
  438. --             The activity may get held up otherwise. 
  439. -- 
  440. function _A_GA_DT_03_lua_complete() 
  441. 	return _A_GA_DT_03_flags.activity_thread_complete 
  442. end 
  443.  
  444. --**************  Everything from here up should be copied for every GA lua file.  **************-- 
  445.  
  446. -- Place any custom functions here for activity processing. 
  447.  
  448. -- ************************* 
  449. -- 
  450. -- Thread functions 
  451. -- 
  452. -- ************************* 
  453.  
  454. -- Each of these functions are called inside a thread_new("") 
  455.  
  456. -- This is called by _A_GA_DT_03_start_instance() in a new thread. 
  457. -- This is responsible for starting scripting.  It should run until all functions 
  458. -- it calls are complete, and then mark the bool that it has completed. 
  459. -- 
  460. function _A_GA_DT_03_thread_process_activity() 
  461. 	inv_weapon_disable_all_but_this_slot(_A_GA_DT_03_tweak_params.rpg_weapon_slot) 
  462. 	 
  463. 	-- Set up hovering 
  464. 	npc_suppress_persona(_A_GA_DT_03_groups.heli_group.chars[1], true) 
  465. 	set_unrecruitable_flag(_A_GA_DT_03_groups.heli_group.chars[1], true) 
  466. 	helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.hover_path) 
  467. 	helicopter_set_max_bank_angle(_A_GA_DT_03_groups.heli_group.vehicle, 9) 
  468. 	helicopters_set_jitter_override(0.1, 0.1) 
  469. 	radio_block(_A_GA_DT_03_groups.heli_group.vehicle) 
  470. 	vehicle_suppress_flipping(_A_GA_DT_03_groups.heli_group.vehicle, true) 
  471. 	vehicle_prevent_explosion_fling(_A_GA_DT_03_groups.heli_group.vehicle, true) 
  472. 	vehicle_infinite_mass(_A_GA_DT_03_groups.heli_group.vehicle, true) 
  473. 	set_dont_attack_me_on_sight_flag(_A_GA_DT_03_groups.heli_group.chars[1], true) 
  474. 	-- Put Pierce in Car 
  475. 	_A_GA_DT_03_PutPierceInCar() 
  476. 	-- Set Pierce as the target 
  477. 	character_make_priority_target(_A_GA_DT_03_groups.protectees.chars[1], true) 
  478. 	--delay(2.0) 
  479. 	-- Set off driving thread 
  480. 	_A_GA_DT_03_threads.flying1_thread = thread_new("_A_GA_DT_03_thread_fly_to_node1") 
  481. 	_A_GA_DT_03_threads.driving1_thread = thread_new("_A_GA_DT_03_thread_drive_to_node1") 
  482. 	 
  483. 	 
  484. 	-- Fly to Node 1 
  485. 	--_A_GA_DT_03_HeliToNode1() 
  486. 	--_A_GA_DT_03_CarToNode1() 
  487. 	-- Wait for a bit 
  488. 	while not (_A_GA_DT_03_flags.driving1_thread_complete and _A_GA_DT_03_flags.flying1_thread_complete)do 
  489. 		thread_yield() 
  490. 	end 
  491. --	delay(3.0) 
  492. 	-- Spawn second roadblock 
  493. 	if not(group_is_loaded(_A_GA_DT_03_groups.roadblock2.name))then 
  494. 		group_create(_A_GA_DT_03_groups.roadblock2.name, true) 
  495. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.roadblock2.name) 
  496. 	end 
  497. 	 
  498. 	-- Second driving thread	 
  499. 	_A_GA_DT_03_threads.flying2_thread = thread_new("_A_GA_DT_03_thread_fly_to_node2") 
  500. 	_A_GA_DT_03_threads.driving2_thread = thread_new("_A_GA_DT_03_thread_drive_to_node2") 
  501. 	 
  502. 	-- Set up chase 
  503. 	_A_GA_DT_03_SetupChase2() 
  504. 	 
  505. 	-- Move to Node 2 
  506. 	while not (_A_GA_DT_03_flags.driving2_thread_complete and _A_GA_DT_03_flags.flying2_thread_complete)do 
  507. 		thread_yield() 
  508. 	end 
  509. 	-- Wait for a bit 
  510. 	--delay(5.0) 
  511. 	 
  512. 	-- Third driving thread	 
  513. 	_A_GA_DT_03_threads.flying3_thread = thread_new("_A_GA_DT_03_thread_fly_to_node3") 
  514. 	_A_GA_DT_03_threads.driving3_thread = thread_new("_A_GA_DT_03_thread_drive_to_node3") 
  515. 	 
  516. 	-- Set up chase 
  517. 	_A_GA_DT_03_SetupChase3() 
  518. 	 
  519. 	while not (_A_GA_DT_03_flags.driving3_thread_complete and _A_GA_DT_03_flags.flying3_thread_complete)do 
  520. 		if (not _A_GA_DT_03_flags.indicators_enabled_after_rappel and is_rappelling(LOCAL_PLAYER)) then 
  521. 			guardian_angel_enable_indicators(true) 
  522. 			_A_GA_DT_03_flags.indicators_enabled_after_rappel = true 
  523. 		end 
  524. 		 
  525. 		thread_yield() 
  526. 	end 
  527.  
  528. 	--Wait for the player to actually be IN rappel mode and re-enable the indicators 
  529. 	if (not _A_GA_DT_03_flags.indicators_enabled_after_rappel) then 
  530. 		while (not is_rappelling(LOCAL_PLAYER)) do 
  531. 			thread_yield() 
  532. 		end 
  533. 		guardian_angel_enable_indicators(true) 
  534. 	end 
  535. 	 
  536. 	_A_GA_DT_03_flags.activity_thread_complete = true 
  537. 	_A_GA_DT_03_threads.activity_thread = -1 
  538. end 
  539.  
  540. -- Drive to Node 1 
  541. function _A_GA_DT_03_thread_drive_to_node1() 
  542. 	_A_GA_DT_03_CarToNode1() 
  543.  
  544. 	vehicle_speed_cancel(_A_GA_DT_03_groups.protectees.vehicle) 
  545. 	vehicle_stop(_A_GA_DT_03_groups.protectees.vehicle) 
  546.  
  547. 	-- Wait until roadblock is dead 
  548. 	while (true) do 
  549. 		local all_chars_dead = true 
  550. 		for i = 1, #(_A_GA_DT_03_groups.roadblock1.chars), 1 do 
  551. 			if (not character_is_dead(_A_GA_DT_03_groups.roadblock1.chars[i])) then 
  552. 				all_chars_dead = false 
  553. 				break 
  554. 			end 
  555. 		end 
  556. 		 
  557. 		if (all_chars_dead) then 
  558. 			break 
  559. 		end 
  560. 		 
  561. 		delay(0.5) 
  562. 	end 
  563.  
  564. 	_A_GA_DT_03_flags.driving1_thread_complete = true 
  565. 	_A_GA_DT_03_threads.driving1_thread = -1 
  566. end 
  567. -- Fly to Node 1 
  568. function _A_GA_DT_03_thread_fly_to_node1() 
  569. 	_A_GA_DT_03_HeliToNode1() 
  570. 	 
  571. 	_A_GA_DT_03_flags.flying1_thread_complete = true 
  572. 	_A_GA_DT_03_threads.flying1_thread = -1 
  573. end 
  574. -- Drive to Node 2 
  575. function _A_GA_DT_03_thread_drive_to_node2() 
  576. 	_A_GA_DT_03_CarToNode2() 
  577.  
  578. 	vehicle_speed_cancel(_A_GA_DT_03_groups.protectees.vehicle) 
  579. 	vehicle_stop(_A_GA_DT_03_groups.protectees.vehicle) 
  580.  
  581. 	-- Wait until roadblock is dead 
  582. 	while (true) do 
  583. 		local all_chars_dead = true 
  584. 		for i = 1, #(_A_GA_DT_03_groups.roadblock2.chars), 1 do 
  585. 			if (not character_is_dead(_A_GA_DT_03_groups.roadblock2.chars[i])) then 
  586. 				all_chars_dead = false 
  587. 				break 
  588. 			end 
  589. 		end 
  590. 		 
  591. 		if (all_chars_dead) then 
  592. 			break 
  593. 		end 
  594. 		 
  595. 		delay(0.5) 
  596. 	end 
  597.  
  598. 	_A_GA_DT_03_flags.driving2_thread_complete = true 
  599. 	_A_GA_DT_03_threads.driving2_thread = -1 
  600. end 
  601. -- Fly to Node 2 
  602. function _A_GA_DT_03_thread_fly_to_node2() 
  603. 	_A_GA_DT_03_HeliToNode2() 
  604. 	 
  605. 	_A_GA_DT_03_flags.flying2_thread_complete = true 
  606. 	_A_GA_DT_03_threads.flying2_thread = -1 
  607. end 
  608. -- Drive to Node 3 
  609. function _A_GA_DT_03_thread_drive_to_node3() 
  610. 	_A_GA_DT_03_CarToNode3() 
  611. 	 
  612. 	_A_GA_DT_03_flags.driving3_thread_complete = true 
  613. 	_A_GA_DT_03_threads.driving3_thread = -1 
  614. end 
  615. -- Fly to Node 3 
  616. function _A_GA_DT_03_thread_fly_to_node3() 
  617. 	guardian_angel_enable_indicators(false) 
  618. 	 
  619. 	_A_GA_DT_03_HeliToNode3() 
  620. 	 
  621. 	_A_GA_DT_03_heli_exit() 
  622. 	 
  623. 	_A_GA_DT_03_flags.flying3_thread_complete = true 
  624. 	_A_GA_DT_03_threads.flying3_thread = -1 
  625. end 
  626. -- ************************* 
  627. -- 
  628. -- Local functions 
  629. -- 
  630. -- ************************* 
  631.  
  632. -- This is called by _A_GA_DT_03_start(level_num) and handles setup for 
  633. -- the level 1 instance. 
  634. -- 
  635. function _A_GA_DT_03_start_lvl_1() 
  636. 	-- Create the first road block 
  637. 	if not(group_is_loaded(_A_GA_DT_03_groups.roadblock1.name))then 
  638. 		group_create(_A_GA_DT_03_groups.roadblock1.name, true) 
  639. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.roadblock1.name) 
  640. 	end 
  641. end 
  642.  
  643. -- Function to get the players out of the helicopter and into rappelling mode 
  644. function _A_GA_DT_03_heli_exit() 
  645. 	if(coop_is_active() == true)then 
  646. 		vehicle_exit_guardian_angel(REMOTE_PLAYER) 
  647. 		if not(is_rappelling(REMOTE_PLAYER)) then 
  648. 			rappel_enter(REMOTE_PLAYER, true, _A_GA_DT_03_navs.remote_rappel_point, _A_GA_DT_03_tweak_params.sniper_weapon_slot) 
  649. 		end 
  650. 	end 
  651. 	 
  652. 	vehicle_exit_guardian_angel(LOCAL_PLAYER) 
  653. 	if not(is_rappelling(LOCAL_PLAYER))then 
  654. 		rappel_enter(LOCAL_PLAYER, true, _A_GA_DT_03_navs.local_rappel_point, _A_GA_DT_03_tweak_params.sniper_weapon_slot) 
  655. 	end 
  656. 	 
  657. 	camera_restrict_set_limits(-25, 20, -30, 30) 
  658. 	camera_restrict_target_object(_A_GA_DT_03_navs.camera_pos) 
  659. 	camera_restrict_set_active(ENABLE) 
  660. end 
  661. -- Move the helicopter to Node 1 
  662. function _A_GA_DT_03_HeliToNode1() 
  663. 	-- Fly along a path 
  664. 	helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.protectees.vehicle) 
  665. 	helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path1a, 15) 
  666. 	helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH) 
  667. 	helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path1b, 5) 
  668. 	helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path1c, 5) 
  669. 	helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.roadblock2.vehicle[1]) 
  670. 	 
  671. 	helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path1d, 10) 
  672. 	helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path2a, 15) 
  673. 	helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path2b, 15) 
  674. 	helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path2c, 15) 
  675. 	helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path3, 10) 
  676. --	helicopter_fly_to_direct_follow_dont_stop(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path4, 25) 
  677.  
  678. 	--helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path1) 
  679. 	--helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path2) 
  680. 	--helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path3) 
  681. 	helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path4a) 
  682. 	helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.roadblock1.vehicle[1]) 
  683. 	helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path4b) 
  684. end 
  685. -- Move the helicopter to Node 2 
  686. function _A_GA_DT_03_HeliToNode2() 
  687. 	helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.roadblock2.vehicle[1]) 
  688. 	helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path5) 
  689. end 
  690. -- Move the helicopter to Node 3 - Rappelling building 
  691. function _A_GA_DT_03_HeliToNode3() 
  692. 	guardian_angel_start_zone_pinning("AcrossWater") 
  693.  
  694. 	-- Fly to directly above the landing point 
  695. 	helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.protectees.vehicle) 
  696. 	helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path6) 
  697. 	 
  698. 	 
  699. 	-- Orient correctly and give it enough time to complete 
  700. 	helicopter_fly_to_set_goal_direction(_A_GA_DT_03_groups.heli_group.vehicle, _A_GA_DT_03_paths.heli_goal_direction, true) 
  701. 	delay(2.0) 
  702. 	 
  703. 	-- Tell the helicopter to land and give it enough time to complete 
  704. 	helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH) 
  705. 	helicopter_fly_to_do(_A_GA_DT_03_groups.heli_group.vehicle, 3.0, true, "", false, _A_GA_DT_03_paths.heli_goal_direction) 
  706. 	delay(4.0) 
  707. end 
  708.  
  709. -- Move Pierce to Node 1 
  710. function _A_GA_DT_03_CarToNode1() 
  711. 	-- Set up intro chase 
  712. 	_A_GA_DT_03_threads.intro_chase1_thread = thread_new("_A_GA_DT_03_SetupIntroChase1") 
  713. 	 
  714. 	npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], false) 
  715. 	audio_play_persona_line(_A_GA_DT_03_groups.protectees.chars[1], "GA_DT01_Get_in_Cars_01") 
  716. 	npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], true) 
  717. 	 
  718. 	-- Pathfind through first spline 
  719. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path1a, true, false) 
  720. 	 
  721. 	-- Set off thread for the attack heli 
  722. --	thread_new("_A_GA_DT_03_Attack_Heli") 
  723. 	vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 25) 
  724. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path1b, true, false) 
  725. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path1c, true, false) 
  726. 	vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 35) 
  727. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path1d, true, false) 
  728. 	 
  729. 	-- Set up second intro chase 
  730. 	_A_GA_DT_03_threads.intro_chase2_thread = thread_new("_A_GA_DT_03_SetupIntroChase2") 
  731. 	 
  732. 	-- Increment the progress bar 
  733. 	guardian_angel_increment_node_progress() 
  734. 	 
  735. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path2a, true, false) 
  736. 	vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 35) 
  737. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path2b, true, false) 
  738. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path2c, true, false) 
  739. 	 
  740. 	-- Increment the progress bar 
  741. 	guardian_angel_increment_node_progress() 
  742. 	 
  743. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path3, true, true) 
  744. 	 
  745. 	-- Increment the progress bar 
  746. 	guardian_angel_increment_node_progress() 
  747. 	 
  748. 	vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 35) 
  749. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path4a, true, true) 
  750. 	 
  751. 	npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], false) 
  752. 	audio_play_persona_line(_A_GA_DT_03_groups.protectees.chars[1], "GA_DT01_First_Roadblock") 
  753. 	npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], true) 
  754. 	 
  755. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path4b, true, true) 
  756. 	 
  757. 	-- Increment the progress bar 
  758. 	guardian_angel_increment_node_progress() 
  759. 	 
  760. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path5, true, true) 
  761. 	 
  762. 	-- Increment the progress bar 
  763. 	guardian_angel_increment_node_progress() 
  764. end 
  765. -- Move Pierce to Node 2 
  766. function _A_GA_DT_03_CarToNode2() 
  767. 	npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], false) 
  768. 	audio_play_persona_line(_A_GA_DT_03_groups.protectees.chars[1], "GA_DT01_Second_Roadblock") 
  769. 	npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], true) 
  770. 	 
  771. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path6, true) 
  772. 	-- Increment the progress bar 
  773. 	guardian_angel_increment_node_progress() 
  774. end 
  775. -- Move Pierce to Node 3 
  776. function _A_GA_DT_03_CarToNode3() 
  777. 	local convo_handle = audio_conversation_load("_A_GA_DT_03_Cross_Bridge")	 
  778. 	audio_conversation_play(convo_handle) 
  779.  
  780. 	-- start ignoring other traffic - just bash through - keeps him from driving off the bridge 
  781. 	vehicle_ignore_repulsors( _A_GA_DT_03_groups.protectees.vehicle, true ) 
  782. 	 
  783. 	--vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 35) 
  784. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path7, true, false) 
  785. 	-- Increment the progress bar 
  786. 	guardian_angel_increment_node_progress() 
  787. 	--delay(1.0) 
  788. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path8a, true, false) 
  789. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path8b, true, false) 
  790. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path8c, true, false) 
  791. 	-- Increment the progress bar 
  792. 	guardian_angel_increment_node_progress() 
  793. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path9a, true) 
  794. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path9b, true) 
  795. 	vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path9c, true) 
  796. 	-- Increment the progress bar 
  797. 	guardian_angel_increment_node_progress() 
  798. 	 
  799. 	 
  800. 	if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase1.vehicle[1])then 
  801. 		vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase1.vehicle[1], false) 
  802. 	end 
  803. 	if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase2.vehicle[1])then 
  804. 		vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase2.vehicle[1], false) 
  805. 	end 
  806. 	if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase3.vehicle[1])then 
  807. 		vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase3.vehicle[1], false) 
  808. 	end 
  809. 	if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase4.vehicle[1])then 
  810. 		vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase4.vehicle[1], false) 
  811. 	end 
  812. 	if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase5.vehicle[1])then 
  813. 		vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase5.vehicle[1], false) 
  814. 	end 
  815. 	if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase6.vehicle[1])then 
  816. 		vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase6.vehicle[1], false) 
  817. 	end 
  818. 	if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase7.vehicle[1])then 
  819. 		vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase7.vehicle[1], false) 
  820. 	end 
  821. 	if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase8.vehicle[1])then 
  822. 		vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase8.vehicle[1], false) 
  823. 	end 
  824.  
  825. 	-- Get Pierce out of the car 
  826. 	delay(5.0) 
  827. 	turn_vulnerable(_A_GA_DT_03_groups.protectees.chars[1]) 
  828. 	on_vehicle_destroyed("", _A_GA_DT_03_groups.protectees.vehicle) 
  829. 	vehicle_exit(_A_GA_DT_03_groups.protectees.chars[1], true) 
  830. end 
  831. function _A_GA_DT_03_SetupChase1() 
  832. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase1.name))then 
  833. 		group_create(_A_GA_DT_03_groups.chase1.name, true) 
  834. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase1.name) 
  835. 	end 
  836. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase2.name))then 
  837. 		group_create(_A_GA_DT_03_groups.chase2.name, true) 
  838. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase2.name) 
  839. 	end 
  840. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase1.chars[1], _A_GA_DT_03_groups.chase1.vehicle[1], 0, true) 
  841. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase1.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  842. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase1.chars[2], _A_GA_DT_03_groups.chase1.vehicle[1], 1, true) 
  843. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase1.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  844. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase2.chars[1], _A_GA_DT_03_groups.chase2.vehicle[1], 0, true) 
  845. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase2.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  846. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase2.chars[2], _A_GA_DT_03_groups.chase2.vehicle[1], 1, true) 
  847. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase2.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  848. 	 
  849. 	-- Wait for people to be in the car 
  850. --	while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase1.chars[1], _A_GA_DT_03_groups.chase1.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase1.chars[2], _A_GA_DT_03_groups.chase1.vehicle[1]))do 
  851. --		thread_yield() 
  852. --	end 
  853. --	while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase2.chars[1], _A_GA_DT_03_groups.chase2.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase2.chars[2], _A_GA_DT_03_groups.chase2.vehicle[1]))do 
  854. --		thread_yield() 
  855. --	end 
  856. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase1.vehicle[1], true) 
  857. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase2.vehicle[1], true) 
  858. 	 
  859. 	vehicle_chase(_A_GA_DT_03_groups.chase1.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  860. 	delay(4.0) 
  861. 	vehicle_chase(_A_GA_DT_03_groups.chase2.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  862. end 
  863. function _A_GA_DT_03_SetupChase2() 
  864. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase3.name))then 
  865. 		group_create(_A_GA_DT_03_groups.chase3.name, true) 
  866. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase3.name) 
  867. 	end 
  868. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase4.name))then 
  869. 		group_create(_A_GA_DT_03_groups.chase4.name, true) 
  870. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase4.name) 
  871. 	end 
  872. 	 
  873. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase3.chars[1], _A_GA_DT_03_groups.chase3.vehicle[1], 0, true) 
  874. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase3.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  875. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase3.chars[2], _A_GA_DT_03_groups.chase3.vehicle[1], 1, true) 
  876. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase3.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  877. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase4.chars[1], _A_GA_DT_03_groups.chase4.vehicle[1], 0, true) 
  878. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase4.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  879. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase4.chars[2], _A_GA_DT_03_groups.chase4.vehicle[1], 1, true) 
  880. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase4.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  881.  
  882. 	-- Wait for people to be in the car 
  883. --	while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase3.chars[1], _A_GA_DT_03_groups.chase3.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase3.chars[2], _A_GA_DT_03_groups.chase3.vehicle[1]))do 
  884. --		thread_yield() 
  885. --	end 
  886. --	while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase4.chars[1], _A_GA_DT_03_groups.chase4.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase4.chars[2], _A_GA_DT_03_groups.chase4.vehicle[1]))do 
  887. --		thread_yield() 
  888. --	end	 
  889. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase3.vehicle[1], true) 
  890. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase4.vehicle[1], true) 
  891. 	 
  892. 	vehicle_chase(_A_GA_DT_03_groups.chase3.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  893. 	vehicle_chase(_A_GA_DT_03_groups.chase4.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  894. end 
  895. function _A_GA_DT_03_SetupChase3() 
  896. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase5.name))then 
  897. 		group_create(_A_GA_DT_03_groups.chase5.name, true) 
  898. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase5.name) 
  899. 	end 
  900. 	--[[ 
  901. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase6.name))then 
  902. 		group_create(_A_GA_DT_03_groups.chase6.name, true) 
  903. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase6.name) 
  904. 	end 
  905. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase7.name))then 
  906. 		group_create(_A_GA_DT_03_groups.chase7.name, true) 
  907. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase7.name) 
  908. 	end 
  909. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase8.name))then 
  910. 		group_create(_A_GA_DT_03_groups.chase8.name, true) 
  911. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase8.name) 
  912. 	end 
  913. 	]]-- 
  914. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase5.chars[1], _A_GA_DT_03_groups.chase5.vehicle[1], 0, true) 
  915. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase5.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  916. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase5.chars[2], _A_GA_DT_03_groups.chase5.vehicle[1], 1, true) 
  917. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase5.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  918. 	--[[ 
  919. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase6.chars[1], _A_GA_DT_03_groups.chase6.vehicle[1], 0, true) 
  920. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase6.chars[2], _A_GA_DT_03_groups.chase6.vehicle[1], 1, true) 
  921. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase7.chars[1], _A_GA_DT_03_groups.chase7.vehicle[1], 0, true) 
  922. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase7.chars[2], _A_GA_DT_03_groups.chase7.vehicle[1], 1, true) 
  923. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase8.chars[1], _A_GA_DT_03_groups.chase8.vehicle[1], 0, true) 
  924. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase8.chars[2], _A_GA_DT_03_groups.chase8.vehicle[1], 1, true) 
  925. 	]]-- 
  926. 	-- Wait for people to be in the car 
  927. --	while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase5.chars[1], _A_GA_DT_03_groups.chase5.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase5.chars[2], _A_GA_DT_03_groups.chase5.vehicle[1]))do 
  928. --		thread_yield() 
  929. --	end 
  930. --	while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase6.chars[1], _A_GA_DT_03_groups.chase6.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase6.chars[2], _A_GA_DT_03_groups.chase6.vehicle[1]))do 
  931. --		thread_yield() 
  932. --	end 
  933. --	while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase7.chars[1], _A_GA_DT_03_groups.chase7.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase7.chars[2], _A_GA_DT_03_groups.chase7.vehicle[1]))do 
  934. --		thread_yield() 
  935. --	end 
  936. --	while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase8.chars[1], _A_GA_DT_03_groups.chase8.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase8.chars[2], _A_GA_DT_03_groups.chase8.vehicle[1]))do 
  937. --		thread_yield() 
  938. --	end 
  939.  
  940. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase5.vehicle[1], true) 
  941. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase6.vehicle[1], true) 
  942. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase7.vehicle[1], true) 
  943. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase8.vehicle[1], true) 
  944. 	 
  945. 	vehicle_chase(_A_GA_DT_03_groups.chase5.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  946. 	--[[ 
  947. 	vehicle_chase(_A_GA_DT_03_groups.chase6.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  948. 	vehicle_chase(_A_GA_DT_03_groups.chase7.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  949. 	vehicle_chase(_A_GA_DT_03_groups.chase8.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  950. 	--]] 
  951. end 
  952. function _A_GA_DT_03_PutPierceInCar() 
  953. 	on_vehicle_destroyed("_A_GA_DT_03_Car_Killed", _A_GA_DT_03_groups.protectees.vehicle) 
  954. 	npc_leash_remove(_A_GA_DT_03_groups.protectees.chars[1]) 
  955. 	-- Have Pierce run to car and get into it 
  956. 	--vehicle_enter_do(_A_GA_DT_03_groups.protectees.chars[1], _A_GA_DT_03_groups.protectees.vehicle, false, 0, false) 
  957. 	vehicle_enter_teleport(_A_GA_DT_03_groups.protectees.chars[1], _A_GA_DT_03_groups.protectees.vehicle, 0, true) 
  958. 	 
  959. 	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.protectees.vehicle, true) 
  960. 	vehicle_suppress_flipping(_A_GA_DT_03_groups.protectees.vehicle, true) 
  961. 	vehicle_prevent_explosion_fling(_A_GA_DT_03_groups.protectees.vehicle, true) 
  962. 	vehicle_infinite_mass(_A_GA_DT_03_groups.protectees.vehicle, true) 
  963. 	 
  964. 	while not(character_is_in_vehicle(_A_GA_DT_03_groups.protectees.chars[1], _A_GA_DT_03_groups.protectees.vehicle))do 
  965. 		thread_yield() 
  966. 	end 
  967. 	set_unjackable_flag(_A_GA_DT_03_groups.protectees.vehicle, true) 
  968. 	turn_invulnerable(_A_GA_DT_03_groups.protectees.chars[1]) 
  969. 	vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 25) 
  970. 	delay(2.0) 
  971. end 
  972. function _A_GA_DT_03_SetupIntroChase1() 
  973. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase9.name))then 
  974. 		group_create(_A_GA_DT_03_groups.chase9.name, true) 
  975. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase9.name) 
  976. 	end 
  977. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase10.name))then 
  978. 		group_create(_A_GA_DT_03_groups.chase10.name, true) 
  979. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase10.name) 
  980. 	end 
  981. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase11.name))then 
  982. 		group_create(_A_GA_DT_03_groups.chase11.name, true) 
  983. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase11.name) 
  984. 	end 
  985. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase12.name))then 
  986. 		group_create(_A_GA_DT_03_groups.chase12.name, true) 
  987. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase12.name) 
  988. 	end 
  989. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase13.name))then 
  990. 		group_create(_A_GA_DT_03_groups.chase13.name, true) 
  991. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase13.name) 
  992. 	end 
  993. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase14.name))then 
  994. 		group_create(_A_GA_DT_03_groups.chase14.name, true) 
  995. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase14.name) 
  996. 	end 
  997. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase15.name))then 
  998. 		group_create(_A_GA_DT_03_groups.chase15.name, true) 
  999. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase15.name) 
  1000. 	end 
  1001. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase16.name))then 
  1002. 		group_create(_A_GA_DT_03_groups.chase16.name, true) 
  1003. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase16.name) 
  1004. 	end 
  1005. 	 
  1006. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase9.chars[1], _A_GA_DT_03_groups.chase9.vehicle[1], 0, true) 
  1007. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase9.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1008. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase9.chars[2], _A_GA_DT_03_groups.chase9.vehicle[1], 1, true) 
  1009. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase9.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1010. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase10.chars[1], _A_GA_DT_03_groups.chase10.vehicle[1], 0, true) 
  1011. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase10.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1012. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase10.chars[2], _A_GA_DT_03_groups.chase10.vehicle[1], 1, true) 
  1013. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase10.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1014. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase11.chars[1], _A_GA_DT_03_groups.chase11.vehicle[1], 0, true) 
  1015. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase11.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1016. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase11.chars[2], _A_GA_DT_03_groups.chase11.vehicle[1], 1, true) 
  1017. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase11.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1018. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase12.chars[1], _A_GA_DT_03_groups.chase12.vehicle[1], 0, true) 
  1019. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase12.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1020. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase12.chars[2], _A_GA_DT_03_groups.chase12.vehicle[1], 1, true) 
  1021. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase12.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1022. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase13.chars[1], _A_GA_DT_03_groups.chase13.vehicle[1], 0, true) 
  1023. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase13.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1024. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase13.chars[2], _A_GA_DT_03_groups.chase13.vehicle[1], 1, true) 
  1025. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase13.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1026. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase14.chars[1], _A_GA_DT_03_groups.chase14.vehicle[1], 0, true) 
  1027. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase14.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1028. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase14.chars[2], _A_GA_DT_03_groups.chase14.vehicle[1], 1, true) 
  1029. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase14.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1030. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase15.chars[1], _A_GA_DT_03_groups.chase15.vehicle[1], 0, true) 
  1031. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase15.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1032. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase15.chars[2], _A_GA_DT_03_groups.chase15.vehicle[1], 1, true) 
  1033. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase15.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1034. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase16.chars[1], _A_GA_DT_03_groups.chase16.vehicle[1], 0, true) 
  1035. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase16.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1036. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase16.chars[2], _A_GA_DT_03_groups.chase16.vehicle[1], 1, true) 
  1037. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase16.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1038. 	 
  1039. 	 
  1040. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase9.vehicle[1], true) 
  1041. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase10.vehicle[1], true) 
  1042. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase11.vehicle[1], true) 
  1043. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase12.vehicle[1], true) 
  1044. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase13.vehicle[1], true) 
  1045. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase14.vehicle[1], true) 
  1046. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase15.vehicle[1], true) 
  1047. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase16.vehicle[1], true) 
  1048. 	 
  1049. 	-- Have enemies chase after Pierce, put some delays in to make it more interesting 
  1050. 	vehicle_chase(_A_GA_DT_03_groups.chase9.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1051. 	delay(4) 
  1052. 	vehicle_chase(_A_GA_DT_03_groups.chase10.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1053. 	delay(5) 
  1054. 	vehicle_chase(_A_GA_DT_03_groups.chase11.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1055. 	delay(5) 
  1056. 	vehicle_chase(_A_GA_DT_03_groups.chase12.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1057. 	delay(5) 
  1058. 	vehicle_chase(_A_GA_DT_03_groups.chase13.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1059. 	delay(5) 
  1060. 	vehicle_chase(_A_GA_DT_03_groups.chase14.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1061. 	delay(4) 
  1062. 	vehicle_chase(_A_GA_DT_03_groups.chase15.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1063. 	delay(4) 
  1064. 	vehicle_chase(_A_GA_DT_03_groups.chase16.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1065. 	 
  1066. end 
  1067. function _A_GA_DT_03_SetupIntroChase2() 
  1068. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase17.name))then 
  1069. 		group_create(_A_GA_DT_03_groups.chase17.name, true) 
  1070. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase17.name) 
  1071. 	end 
  1072. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase18.name))then 
  1073. 		group_create(_A_GA_DT_03_groups.chase18.name, true) 
  1074. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase18.name) 
  1075. 	end 
  1076. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase19.name))then 
  1077. 		group_create(_A_GA_DT_03_groups.chase19.name, true) 
  1078. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase19.name) 
  1079. 	end 
  1080. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase20.name))then 
  1081. 		group_create(_A_GA_DT_03_groups.chase20.name, true) 
  1082. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase20.name) 
  1083. 	end 
  1084. 	if not(group_is_loaded(_A_GA_DT_03_groups.chase21.name))then 
  1085. 		group_create(_A_GA_DT_03_groups.chase21.name, true) 
  1086. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.chase21.name) 
  1087. 	end 
  1088. 	 
  1089. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase17.chars[1], _A_GA_DT_03_groups.chase17.vehicle[1], 0, true) 
  1090. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase17.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1091. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase17.chars[2], _A_GA_DT_03_groups.chase17.vehicle[1], 1, true) 
  1092. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase17.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1093. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase18.chars[1], _A_GA_DT_03_groups.chase18.vehicle[1], 0, true) 
  1094. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase18.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1095. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase18.chars[2], _A_GA_DT_03_groups.chase18.vehicle[1], 1, true) 
  1096. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase18.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1097. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase19.chars[1], _A_GA_DT_03_groups.chase19.vehicle[1], 0, true) 
  1098. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase19.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1099. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase19.chars[2], _A_GA_DT_03_groups.chase19.vehicle[1], 1, true) 
  1100. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase19.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1101. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase20.chars[1], _A_GA_DT_03_groups.chase20.vehicle[1], 0, true) 
  1102. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase20.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1103. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase20.chars[2], _A_GA_DT_03_groups.chase20.vehicle[1], 1, true) 
  1104. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase20.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1105. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase21.chars[1], _A_GA_DT_03_groups.chase21.vehicle[1], 0, true) 
  1106. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase21.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1107. 	vehicle_enter_teleport(_A_GA_DT_03_groups.chase21.chars[2], _A_GA_DT_03_groups.chase21.vehicle[1], 1, true) 
  1108. --	ai_add_enemy_target(_A_GA_DT_03_groups.chase21.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true) 
  1109. 	 
  1110. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase17.vehicle[1], true) 
  1111. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase18.vehicle[1], true) 
  1112. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase19.vehicle[1], true) 
  1113. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase20.vehicle[1], true) 
  1114. --	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase21.vehicle[1], true) 
  1115. 	 
  1116. 	-- Have enemies chase after Pierce, put some delays in to make it more interesting 
  1117. 	 
  1118. 	vehicle_chase(_A_GA_DT_03_groups.chase17.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1119. 	delay(4) 
  1120. 	vehicle_chase(_A_GA_DT_03_groups.chase18.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1121. 	delay(4) 
  1122. 	vehicle_chase(_A_GA_DT_03_groups.chase19.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1123. 	delay(4) 
  1124. 	vehicle_chase(_A_GA_DT_03_groups.chase20.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1125. 	delay(4) 
  1126. 	vehicle_chase(_A_GA_DT_03_groups.chase21.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false) 
  1127. 	 
  1128. 	-- Set up chase 
  1129. 	_A_GA_DT_03_SetupChase1() 
  1130. end 
  1131. function _A_GA_DT_03_Car_Killed() 
  1132. 	marker_remove(_A_GA_DT_03_groups.protectees.vehicle) 
  1133. 	on_vehicle_destroyed("", _A_GA_DT_03_groups.protectees.vehicle) 
  1134. 	character_kill(_A_GA_DT_03_groups.protectees.chars[1], true) 
  1135. end 
  1136. function _A_GA_DT_03_Attack_Heli() 
  1137. 	if not (group_is_loaded(_A_GA_DT_03_groups.attack_heli.name))then 
  1138. 		group_create(_A_GA_DT_03_groups.attack_heli.name, true) 
  1139. 		guardian_angel_register_script_group(_A_GA_DT_03_groups.attack_heli.name) 
  1140. 	end 
  1141. 	 
  1142. 	vehicle_enter_teleport(_A_GA_DT_03_groups.attack_heli.chars[1], _A_GA_DT_03_groups.attack_heli.vehicle[1], 0, true) 
  1143. 	vehicle_enter_teleport(_A_GA_DT_03_groups.attack_heli.chars[2], _A_GA_DT_03_groups.attack_heli.vehicle[1], 2, true) 
  1144. 	 
  1145. 	vehicle_suppress_npc_exit(_A_GA_DT_03_groups.attack_heli.vehicle[1], true) 
  1146. 	 
  1147. 	helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.attack_heli.vehicle[1], -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.attack_heli, 2) 
  1148. end 
  1149.