./_a_ga_nw_01.lua

  1.  
  2. --[[ 
  3. 	_A_GA_NW_01.lua 
  4. 	SR3 Activity Script 
  5. 	DATE: 12/06/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_NW_01_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_NW_01_groups = { 
  36. 		protectees = { 
  37. 			name = "ga_nw1_protectee_group", 
  38. 			chars = { "npc_Kinzie", "npc_protectee_guard1", "npc_protectee_guard2", "npc_protectee_guard3" }, 
  39. 		}, 
  40. 		heli_group = { 
  41. 			name = "ga_nw1_heli_group", 
  42. 			chars = { "npc_heli_pilot" }, 
  43. 			vehicle = "veh_player_heli", 
  44. 		}, 
  45. 		getaway_group = { 
  46. 			name = "ga_nw1_getaway_group", 
  47. 			chars = { "npc_getawaydriver" }, 
  48. 			vehicle = "veh_getawaycar", 
  49. 		}, 
  50. 		chase_heli = { 
  51. 			name = "ga_nw1_chase_heli_group", 
  52. 			chars = { "npc_chase_heli_pilot" }, 
  53. 			vehicle = "veh_Heli_Chase", 
  54. 		}, 
  55. 		chase1 = { 
  56. 			name = "ga_nw1_chase1_group", 
  57. 			chars = { "npc_chase1 001" }, 
  58. 			vehicle = "veh_chase1", 
  59. 		}, 
  60. 		chase2 = { 
  61. 			name = "ga_nw1_chase2_group", 
  62. 			chars = { "npc_chase2 001" }, 
  63. 			vehicle = "veh_chase2", 
  64. 		}, 
  65. 		chase3 = { 
  66. 			name = "ga_nw1_chase3_group", 
  67. 			chars = { "npc_chase3 001" }, 
  68. 			vehicle = "veh_chase3", 
  69. 		}, 
  70. 		chase4 = { 
  71. 			name = "ga_nw1_chase4_group", 
  72. 			chars = { "npc_chase4 001" }, 
  73. 			vehicle = "veh_chase4", 
  74. 		}, 
  75. 		chase5 = { 
  76. 			name = "ga_nw1_chase5_group", 
  77. 			chars = { "npc_chase5 001" }, 
  78. 			vehicle = "veh_chase5", 
  79. 		}, 
  80. 		chase6 = { 
  81. 			name = "ga_nw1_chase6_group", 
  82. 			chars = { "npc_chase6 001" }, 
  83. 			vehicle = "veh_chase6", 
  84. 		}, 
  85. 		chase7 = { 
  86. 			name = "ga_nw1_chase7_group", 
  87. 			chars = { "npc_chase7 001" }, 
  88. 			vehicle = "veh_chase7", 
  89. 		}, 
  90. 		chase8 = { 
  91. 			name = "ga_nw1_chase8_group", 
  92. 			chars = { "npc_chase8 001" }, 
  93. 			vehicle = "veh_chase8", 
  94. 		}, 
  95. 		chase9 = { 
  96. 			name = "ga_nw1_chase9_group", 
  97. 			chars = { "npc_chase9 001", "npc_chase9 002" }, 
  98. 			vehicle = "veh_chase9", 
  99. 		}, 
  100. 		chase10 = { 
  101. 			name = "ga_nw1_chase10_group", 
  102. 			chars = { "npc_chase10 001" }, 
  103. 			vehicle = "veh_chase10", 
  104. 		}, 
  105. 		chase11 = { 
  106. 			name = "ga_nw1_chase11_group", 
  107. 			chars = { "npc_chase11 001" }, 
  108. 			vehicle = "veh_chase11", 
  109. 		}, 
  110. 		chase12 = { 
  111. 			name = "ga_nw1_chase12_group", 
  112. 			chars = { "npc_chase12 001", "npc_chase12 002" }, 
  113. 			vehicle = "veh_chase12", 
  114. 		}, 
  115. 		chase13 = { 
  116. 			name = "ga_nw1_chase13_group", 
  117. 			chars = { "npc_chase13 001", "npc_chase13 002" }, 
  118. 			vehicle = "veh_chase13", 
  119. 		}, 
  120. 		chase14 = { 
  121. 			name = "ga_nw1_chase14_group", 
  122. 			chars = { "npc_chase14 001" }, 
  123. 			vehicle = "veh_chase14", 
  124. 		}, 
  125. 		chase15 = { 
  126. 			name = "ga_nw1_chase15_group", 
  127. 			chars = { "npc_chase15 001" }, 
  128. 			vehicle = "veh_chase15", 
  129. 		}, 
  130. 		chase16 = { 
  131. 			name = "ga_nw1_chase16_group", 
  132. 			chars = { "npc_chase16 001" }, 
  133. 			vehicle = "veh_chase16", 
  134. 		}, 
  135. 		chase17 = { 
  136. 			name = "ga_nw1_chase17_group", 
  137. 			chars = { "npc_chase17 001" }, 
  138. 			vehicle = "veh_chase17", 
  139. 		}, 
  140. 		chase18 = { 
  141. 			name = "ga_nw1_chase18_group", 
  142. 			chars = { "npc_chase18 001" }, 
  143. 			vehicle = "veh_chase18", 
  144. 		}, 
  145. 		chase19 = { 
  146. 			name = "ga_nw1_chase19_group", 
  147. 			chars = { "npc_chase19 001" }, 
  148. 			vehicle = "veh_chase19", 
  149. 		}, 
  150. 		chase20 = { 
  151. 			name = "ga_nw1_chase20_group", 
  152. 			chars = { "npc_chase20 001" }, 
  153. 			vehicle = "veh_chase20", 
  154. 		}, 
  155. 		chase21 = { 
  156. 			name = "ga_nw1_chase21_group", 
  157. 			chars = { "npc_chase21 001" }, 
  158. 			vehicle = "veh_chase21", 
  159. 		}, 
  160. 		chase22 = { 
  161. 			name = "ga_nw1_chase22_group", 
  162. 			chars = { "npc_chase22 001" }, 
  163. 			vehicle = "veh_chase22", 
  164. 		}, 
  165. 		chase23 = { 
  166. 			name = "ga_nw1_chase23_group", 
  167. 			chars = { "npc_chase23 001" }, 
  168. 			vehicle = "veh_chase23", 
  169. 		}, 
  170. 		chase24 = { 
  171. 			name = "ga_nw1_chase24_group", 
  172. 			chars = { "npc_chase24 001" }, 
  173. 			vehicle = "veh_chase24", 
  174. 		}, 
  175. 		chase25 = { 
  176. 			name = "ga_nw1_chase25_group", 
  177. 			chars = { "npc_chase25 001" }, 
  178. 			vehicle = "veh_chase25", 
  179. 		}, 
  180. 		chase26 = { 
  181. 			name = "ga_nw1_chase26_group", 
  182. 			chars = { "npc_chase26 001" }, 
  183. 			vehicle = "veh_chase26", 
  184. 		}, 
  185. 		chase27 = { 
  186. 			name = "ga_nw1_chase27_group", 
  187. 			chars = { "npc_chase27 001" }, 
  188. 			vehicle = "veh_chase27", 
  189. 		}, 
  190. 		chase28 = { 
  191. 			name = "ga_nw1_chase28_group", 
  192. 			chars = { "npc_chase28 001" }, 
  193. 			vehicle = "veh_chase28", 
  194. 		}, 
  195. 	} 
  196.  
  197. -- Navpoints -- 
  198. 	_A_GA_NW_01_navs = { 
  199. 		local_point = "ga_nw1_local_end", 
  200. 		remote_point = "ga_nw1_remote_end", 
  201. 	} 
  202.  
  203. -- Paths -- 
  204.  
  205. 	_A_GA_NW_01_paths = { 
  206. 		script_path_name = "", 
  207. 		getaway_pickup_path = "getaway_pickup_path", 
  208. 		getaway1_path = "getaway1_path", 
  209. 		getaway2a_path = "getaway2a_path", 
  210. 		getaway2b_path = "getaway2b_path", 
  211. 		getaway2c_path = "getaway2c_path", 
  212. 		getaway3a_path = "getaway3a_path", 
  213. 		getaway3b_path = "getaway3b_path", 
  214. 		getaway3c_path = "getaway3c_path", 
  215. 		getaway3d_path = "getaway3d_path", 
  216. 		getaway4a_path = "getaway4a_path", 
  217. 		getaway4b_path = "getaway4b_path", 
  218. 		getaway4c_path = "getaway4c_path", 
  219. 		getaway4d_path = "getaway4d_path", 
  220. 		getaway5a_path = "getaway5a_path", 
  221. 		getaway5b_path = "getaway5b_path", 
  222. 		getaway5c_path = "getaway5c_path", 
  223. 		getaway6a_path = "getaway6a_path", 
  224. 		getaway6b_path = "getaway6b_path", 
  225. 		getaway6c_path = "getaway6c_path", 
  226. 		getaway6d_path = "getaway6d_path", 
  227. 		heli1_path = "heli1_path", 
  228. 		heli2a_path = "heli2a_path", 
  229. 		heli2b_path = "heli2b_path", 
  230. 		heli2c_path = "heli2c_path", 
  231. 		heli3a_path = "heli3a_path", 
  232. 		heli3b_path = "heli3b_path", 
  233. 		heli3c_path = "heli3c_path", 
  234. 		heli3d_path = "heli3d_path", 
  235. 		heli4a_path = "heli4a_path", 
  236. 		heli4b_path = "heli4b_path", 
  237. 		heli4c_path = "heli4c_path", 
  238. 		heli4d_path = "heli4d_path", 
  239. 		heli5a_path = "heli5a_path", 
  240. 		heli5b_path = "heli5b_path", 
  241. 		heli5c_path = "heli5c_path", 
  242. 		heli6a_path = "heli6a_path", 
  243. 		heli6b_path = "heli6b_path", 
  244. 		heli6c_path = "heli6c_path", 
  245. 		heli6d_path = "heli6d_path", 
  246. 	} 
  247. 	 
  248. 	 
  249. -- Triggers -- 
  250.  
  251. -- Characters -- 
  252.  
  253. -- Vehicles -- 
  254.  
  255. -- Mesh Movers -- 
  256.  
  257. -- Text -- 
  258.  
  259. -- Threads -- 
  260. 	_A_GA_NW_01_threads = { 
  261. 		activity_thread = -1, 
  262. 		getaway1_thread = -1, 
  263. 		getaway2a_thread = -1, 
  264. 		getaway2b_thread = -1, 
  265. 		getaway2c_thread = -1, 
  266. 		getaway3a_thread = -1, 
  267. 		getaway3b_thread = -1, 
  268. 		getaway3c_thread = -1, 
  269. 		getaway3d_thread = -1, 
  270. 		getaway4a_thread = -1, 
  271. 		getaway4b_thread = -1, 
  272. 		getaway4c_thread = -1, 
  273. 		getaway4d_thread = -1, 
  274. 		getaway5a_thread = -1, 
  275. 		getaway5b_thread = -1, 
  276. 		getaway5c_thread = -1, 
  277. 		getaway6a_thread = -1, 
  278. 		getaway6b_thread = -1, 
  279. 		getaway6c_thread = -1, 
  280. 		getaway6d_thread = -1, 
  281. 		heli1_thread = -1, 
  282. 		heli2a_thread = -1, 
  283. 		heli2b_thread = -1, 
  284. 		heli2c_thread = -1, 
  285. 		heli3a_thread = -1, 
  286. 		heli3b_thread = -1, 
  287. 		heli3c_thread = -1, 
  288. 		heli3d_thread = -1, 
  289. 		heli4a_thread = -1, 
  290. 		heli4b_thread = -1, 
  291. 		heli4c_thread = -1, 
  292. 		heli4d_thread = -1, 
  293. 		heli5a_thread = -1, 
  294. 		heli5b_thread = -1, 
  295. 		heli5c_thread = -1, 
  296. 		heli6a_thread = -1, 
  297. 		heli6b_thread = -1, 
  298. 		heli6c_thread = -1, 
  299. 		heli6d_thread = -1, 
  300. 	} 
  301.  
  302. -- Checkpoints -- 
  303. 	 
  304. -- Cutscenes -- 
  305.  
  306. -- Conversations -- 
  307. 	_A_GA_NW_01_convo = { 
  308. 		kinzie_picked_up = { 
  309. 			name = "_A_GA_NW_01_Saints_Arrive", 
  310. 			handle = INVALID_CONVERSATION_HANDLE, 
  311. 		}, 
  312. 		 
  313. 		enemy_heli = { 
  314. 			name = "_A_GA_NW_01_Enemy_Heli", 
  315. 			handle = INVALID_CONVERSATION_HANDLE, 
  316. 		}, 
  317. 	} 
  318.  
  319. -- Other -- 
  320. 	_A_GA_NW_01_flags = { 
  321. 		activity_thread_complete = false, 
  322. 		getaway1_thread_complete = false, 
  323. 		getaway2a_thread_complete = false, 
  324. 		getaway2b_thread_complete = false, 
  325. 		getaway2c_thread_complete = false, 
  326. 		getaway3a_thread_complete = false, 
  327. 		getaway3b_thread_complete = false, 
  328. 		getaway3c_thread_complete = false, 
  329. 		getaway3d_thread_complete = false, 
  330. 		getaway4a_thread_complete = false, 
  331. 		getaway4b_thread_complete = false, 
  332. 		getaway4c_thread_complete = false, 
  333. 		getaway4d_thread_complete = false, 
  334. 		getaway5a_thread_complete = false, 
  335. 		getaway5b_thread_complete = false, 
  336. 		getaway5c_thread_complete = false, 
  337. 		getaway6a_thread_complete = false, 
  338. 		getaway6b_thread_complete = false, 
  339. 		getaway6c_thread_complete = false, 
  340. 		getaway6d_thread_complete = false, 
  341. 		heli1_thread_complete = false, 
  342. 		heli2a_thread_complete = false, 
  343. 		heli2b_thread_complete = false, 
  344. 		heli2c_thread_complete = false, 
  345. 		heli3a_thread_complete = false, 
  346. 		heli3b_thread_complete = false, 
  347. 		heli3c_thread_complete = false, 
  348. 		heli3d_thread_complete = false, 
  349. 		heli4a_thread_complete = false, 
  350. 		heli4b_thread_complete = false, 
  351. 		heli4c_thread_complete = false, 
  352. 		heli4d_thread_complete = false, 
  353. 		heli5a_thread_complete = false, 
  354. 		heli5b_thread_complete = false, 
  355. 		heli5c_thread_complete = false, 
  356. 		heli6a_thread_complete = false, 
  357. 		heli6b_thread_complete = false, 
  358. 		heli6c_thread_complete = false, 
  359. 		heli6d_thread_complete = false, 
  360. 	} 
  361. 	 
  362. 	_A_GA_NW_01_chase = {	 
  363. 		section_01 = {  
  364. 			vehicle_path = "", 
  365. 			heli_path = "", 
  366. 			use_navmesh = true, 
  367. 		}, 
  368. 	} 
  369. 	seat_number = 1 
  370. 	 
  371. 	_A_GA_NW_01_all_chase_groups = { _A_GA_NW_01_groups.chase1, _A_GA_NW_01_groups.chase2, _A_GA_NW_01_groups.chase3, 
  372. 									 _A_GA_NW_01_groups.chase4, _A_GA_NW_01_groups.chase5, _A_GA_NW_01_groups.chase6, 
  373. 									 _A_GA_NW_01_groups.chase7, _A_GA_NW_01_groups.chase8, _A_GA_NW_01_groups.chase9, 
  374. 									 _A_GA_NW_01_groups.chase10, _A_GA_NW_01_groups.chase11, _A_GA_NW_01_groups.chase12, 
  375. 									 _A_GA_NW_01_groups.chase13, _A_GA_NW_01_groups.chase14, _A_GA_NW_01_groups.chase15, 
  376. 									 _A_GA_NW_01_groups.chase16, _A_GA_NW_01_groups.chase17, _A_GA_NW_01_groups.chase18, 
  377. 									 _A_GA_NW_01_groups.chase19, _A_GA_NW_01_groups.chase20, _A_GA_NW_01_groups.chase21, 
  378. 									 _A_GA_NW_01_groups.chase22, _A_GA_NW_01_groups.chase23, _A_GA_NW_01_groups.chase24, 
  379. 									 _A_GA_NW_01_groups.chase25, _A_GA_NW_01_groups.chase26, _A_GA_NW_01_groups.chase27, 
  380. 									 _A_GA_NW_01_groups.chase28} 
  381. -- ************************* 
  382. -- 
  383. -- Required Functions 
  384. -- 
  385. -- ************************* 
  386.  
  387. -- These functions are required for the activity to run correctly. 
  388. -- They can be customized but they should function as outlined in the comments. 
  389.  
  390. -- This is called during the activity setup.  This should be used to spawn any required 
  391. -- script_groups/npcs/vehicles or other required setup the lua will require later. 
  392. -- CALLED FROM CODE 
  393. -- 
  394. -- level_num = The level to start for this instance of guardian angel. 
  395. --  
  396. function _A_GA_NW_01_start(level_num) 
  397. 	-- Handle any initialization 
  398.  
  399. 	if (level_num == 1) then 
  400. 		-- Handle starting up level 1 for this activity instance 
  401. 		_A_GA_NW_01_start_lvl_1() 
  402. 	end 
  403. 	 
  404. end 
  405.  
  406. -- This is the primary function responsible for cleaning up the entire activity 
  407. -- CALLED FROM CODE 
  408. -- 
  409. function _A_GA_NW_01_cleanup( ) 
  410.  
  411. 	-- Handle any cleanup 
  412. 	if (group_is_loaded(_A_GA_NW_01_groups.protectees.name))then 
  413. 		group_destroy(_A_GA_NW_01_groups.protectees.name) 
  414. 	end 
  415. 	if (group_is_loaded(_A_GA_NW_01_groups.heli_group.name))then 
  416. 		group_destroy(_A_GA_NW_01_groups.heli_group.name) 
  417. 	end 
  418. 	if (group_is_loaded(_A_GA_NW_01_groups.getaway_group.name))then 
  419. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.getaway_group.vehicle) 
  420. 		group_destroy(_A_GA_NW_01_groups.getaway_group.name) 
  421. 	end 
  422. 	 
  423. 	if (group_is_loaded(_A_GA_NW_01_groups.chase_heli.name))then 
  424. 		group_destroy(_A_GA_NW_01_groups.chase_heli.name) 
  425. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase_heli.name) 
  426. 	end 
  427. 	if (group_is_loaded(_A_GA_NW_01_groups.chase1.name))then 
  428. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase1.vehicle) 
  429. 		group_destroy(_A_GA_NW_01_groups.chase1.name) 
  430. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase1.name) 
  431. 	end 
  432. 	if(group_is_loaded(_A_GA_NW_01_groups.chase2.name))then 
  433. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase2.vehicle) 
  434. 		group_destroy(_A_GA_NW_01_groups.chase2.name) 
  435. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase2.name) 
  436. 	end 
  437. 	if(group_is_loaded(_A_GA_NW_01_groups.chase3.name))then 
  438. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase3.vehicle) 
  439. 		group_destroy(_A_GA_NW_01_groups.chase3.name) 
  440. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase3.name) 
  441. 	end 
  442. 	if(group_is_loaded(_A_GA_NW_01_groups.chase4.name))then 
  443. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase4.vehicle) 
  444. 		group_destroy(_A_GA_NW_01_groups.chase4.name) 
  445. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase4.name) 
  446. 	end 
  447. 	if(group_is_loaded(_A_GA_NW_01_groups.chase5.name))then 
  448. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase5.vehicle) 
  449. 		group_destroy(_A_GA_NW_01_groups.chase5.name) 
  450. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase5.name) 
  451. 	end 
  452. 	if(group_is_loaded(_A_GA_NW_01_groups.chase6.name))then 
  453. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase6.vehicle) 
  454. 		group_destroy(_A_GA_NW_01_groups.chase6.name) 
  455. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase6.name) 
  456. 	end 
  457. 	if(group_is_loaded(_A_GA_NW_01_groups.chase7.name))then 
  458. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase7.vehicle) 
  459. 		group_destroy(_A_GA_NW_01_groups.chase7.name) 
  460. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase7.name) 
  461. 	end 
  462. 	if(group_is_loaded(_A_GA_NW_01_groups.chase8.name))then 
  463. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase8.vehicle) 
  464. 		group_destroy(_A_GA_NW_01_groups.chase8.name) 
  465. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase8.name) 
  466. 	end 
  467. 	if(group_is_loaded(_A_GA_NW_01_groups.chase9.name))then 
  468. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase9.vehicle) 
  469. 		group_destroy(_A_GA_NW_01_groups.chase9.name) 
  470. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase9.name) 
  471. 	end 
  472. 	if(group_is_loaded(_A_GA_NW_01_groups.chase10.name))then 
  473. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase10.vehicle) 
  474. 		group_destroy(_A_GA_NW_01_groups.chase10.name) 
  475. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase10.name) 
  476. 	end 
  477. 	if(group_is_loaded(_A_GA_NW_01_groups.chase11.name))then 
  478. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase11.vehicle) 
  479. 		group_destroy(_A_GA_NW_01_groups.chase11.name) 
  480. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase11.name) 
  481. 	end 
  482. 	if(group_is_loaded(_A_GA_NW_01_groups.chase12.name))then 
  483. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase12.vehicle) 
  484. 		group_destroy(_A_GA_NW_01_groups.chase12.name) 
  485. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase12.name) 
  486. 	end 
  487. 	if(group_is_loaded(_A_GA_NW_01_groups.chase13.name))then 
  488. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase13.vehicle) 
  489. 		group_destroy(_A_GA_NW_01_groups.chase13.name) 
  490. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase13.name) 
  491. 	end 
  492. 	if(group_is_loaded(_A_GA_NW_01_groups.chase14.name))then 
  493. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase14.vehicle) 
  494. 		group_destroy(_A_GA_NW_01_groups.chase14.name) 
  495. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase14.name) 
  496. 	end 
  497. 	if(group_is_loaded(_A_GA_NW_01_groups.chase15.name))then 
  498. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase15.vehicle) 
  499. 		group_destroy(_A_GA_NW_01_groups.chase15.name) 
  500. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase15.name) 
  501. 	end 
  502. 	if(group_is_loaded(_A_GA_NW_01_groups.chase16.name))then 
  503. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase16.vehicle) 
  504. 		group_destroy(_A_GA_NW_01_groups.chase16.name) 
  505. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase16.name) 
  506. 	end 
  507. 	if(group_is_loaded(_A_GA_NW_01_groups.chase17.name))then 
  508. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase17.vehicle) 
  509. 		group_destroy(_A_GA_NW_01_groups.chase17.name) 
  510. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase17.name) 
  511. 	end 
  512. 	if(group_is_loaded(_A_GA_NW_01_groups.chase18.name))then 
  513. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase18.vehicle) 
  514. 		group_destroy(_A_GA_NW_01_groups.chase18.name) 
  515. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase18.name) 
  516. 	end 
  517. 	if(group_is_loaded(_A_GA_NW_01_groups.chase19.name))then 
  518. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase19.vehicle) 
  519. 		group_destroy(_A_GA_NW_01_groups.chase19.name) 
  520. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase19.name) 
  521. 	end 
  522. 	if(group_is_loaded(_A_GA_NW_01_groups.chase20.name))then 
  523. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase20.vehicle) 
  524. 		group_destroy(_A_GA_NW_01_groups.chase20.name) 
  525. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase20.name) 
  526. 	end 
  527. 	if(group_is_loaded(_A_GA_NW_01_groups.chase21.name))then 
  528. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase21.vehicle) 
  529. 		group_destroy(_A_GA_NW_01_groups.chase21.name) 
  530. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase21.name) 
  531. 	end 
  532. 	if(group_is_loaded(_A_GA_NW_01_groups.chase22.name))then 
  533. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase22.vehicle) 
  534. 		group_destroy(_A_GA_NW_01_groups.chase22.name) 
  535. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase22.name) 
  536. 	end 
  537. 	if(group_is_loaded(_A_GA_NW_01_groups.chase23.name))then 
  538. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase23.vehicle) 
  539. 		group_destroy(_A_GA_NW_01_groups.chase23.name) 
  540. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase23.name) 
  541. 	end 
  542. 	if(group_is_loaded(_A_GA_NW_01_groups.chase24.name))then 
  543. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase24.vehicle) 
  544. 		group_destroy(_A_GA_NW_01_groups.chase24.name) 
  545. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase24.name) 
  546. 	end 
  547. 	if(group_is_loaded(_A_GA_NW_01_groups.chase25.name))then 
  548. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase25.vehicle) 
  549. 		group_destroy(_A_GA_NW_01_groups.chase25.name) 
  550. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase25.name) 
  551. 	end 
  552. 	if(group_is_loaded(_A_GA_NW_01_groups.chase26.name))then 
  553. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase26.vehicle) 
  554. 		group_destroy(_A_GA_NW_01_groups.chase26.name) 
  555. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase26.name) 
  556. 	end 
  557. 	if(group_is_loaded(_A_GA_NW_01_groups.chase27.name))then 
  558. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase27.vehicle) 
  559. 		group_destroy(_A_GA_NW_01_groups.chase27.name) 
  560. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase27.name) 
  561. 	end 
  562. 	if(group_is_loaded(_A_GA_NW_01_groups.chase28.name))then 
  563. 		on_vehicle_destroyed("", _A_GA_NW_01_groups.chase28.vehicle) 
  564. 		group_destroy(_A_GA_NW_01_groups.chase28.name) 
  565. 		guardian_angel_unregister_script_group(_A_GA_NW_01_groups.chase28.name) 
  566. 	end 
  567. 	 
  568. 	-- Cleanup any existing threads. 
  569. 	for i, thread in pairs(_A_GA_NW_01_threads) do 
  570. 		if ((thread ~= -1) and (thread_check_done(thread) == false)) then 
  571. 			thread_kill(thread) 
  572. 		end 
  573. 	end 
  574.  
  575. 	helicopters_set_jitter_override() 
  576. end 
  577.  
  578. -- ************************* 
  579. -- 
  580. -- Callback functions 
  581. -- 
  582. -- ************************* 
  583.  
  584. -- 
  585. -- Lua processing start - These are the functions you reference in the table file to 
  586. --                         start scripting. 
  587. -- 
  588.  
  589. function _A_GA_NW_01_init() 
  590. 	inv_weapon_disable_all_but_this_slot(_A_GA_NW_01_tweak_params.sniper_weapon_slot, true) 
  591.  
  592. 	-- Return true so the activity can continue 
  593. 	return true 
  594. end 
  595.  
  596. -- Called from code to start lua processing. 
  597. -- IMPORTANT: This should only call the "main" function as a new thread and immediately 
  598. --             return true.  Doing anything else will break the activity. 
  599. -- 
  600. function _A_GA_NW_01_start_instance() 
  601. 	-- Kick off a thread to process the entire car chase sequence 
  602. 	_A_GA_NW_01_threads.activity_thread = thread_new("_A_GA_NW_01_thread_process_activity") 
  603.  
  604. 	-- Return true so the activity can continue 
  605. 	return true 
  606. end 
  607.  
  608. -- 
  609. -- Progress Checks - These are how the activity instance knows if lua is complete. 
  610. --                    Whenever a thread completes, it should mark a bool in 
  611. --                    _A_GA_NW_01_flags to true.  These functions 
  612. --                    should only return that bool, as anything else could hold 
  613. --                    up processing. 
  614. -- 
  615.  
  616. -- Called from code to check if the chase seqeunce has completed 
  617. -- IMPORTANT: Do nothing but return the bool that contains the status you are checking. 
  618. --             The activity may get held up otherwise. 
  619. -- 
  620. function _A_GA_NW_01_lua_complete() 
  621. 	return _A_GA_NW_01_flags.activity_thread_complete 
  622. end 
  623.  
  624. --**************  Everything from here up should be copied for every GA lua file.  **************-- 
  625.  
  626. -- Place any custom functions here for activity processing. 
  627.  
  628. -- ************************* 
  629. -- 
  630. -- Thread functions 
  631. -- 
  632. -- ************************* 
  633.  
  634. -- Each of these functions are called inside a thread_new("") 
  635.  
  636. -- This is called by _A_GA_NW_01_start_instance() in a new thread. 
  637. -- This is responsible for starting scripting.  It should run until all functions 
  638. -- it calls are complete, and then mark the bool that it has completed. 
  639. -- 
  640. function _A_GA_NW_01_thread_process_activity() 
  641. 	_A_GA_NW_01_PickupKinzie() 
  642. 	_A_GA_NW_01_GetInCar() 
  643. 	_A_GA_NW_01_Heli_Pickup() 
  644. 	 
  645. 	-- Intro getaway path 
  646. 	_A_GA_NW_01_threads.heli1_thread = thread_new("_A_GA_NW_01_thread_heli1") 
  647. 	_A_GA_NW_01_threads.getaway1_thread = thread_new("_A_GA_NW_01_thread_getaway1") 
  648. 	while not(_A_GA_NW_01_flags.getaway1_thread_complete and _A_GA_NW_01_flags.heli1_thread_complete)do 
  649. --	while not(_A_GA_NW_01_flags.getaway1_thread_complete)do 
  650. 		thread_yield() 
  651. 	end 
  652. 	 
  653. 	-- Increment the progress bar 
  654. 	guardian_angel_increment_node_progress() 
  655. 	 
  656. 	----------------------------------------------------- 
  657. 	-- Path 2 section 
  658. 	----------------------------------------------------- 
  659. 	_A_GA_NW_01_threads.heli2a_thread = thread_new("_A_GA_NW_01_thread_heli2a") 
  660. 	_A_GA_NW_01_threads.getaway2a_thread = thread_new("_A_GA_NW_01_thread_getaway2a") 
  661. 	_A_GA_NW_01_SetupChase1a() 
  662. 	while not(_A_GA_NW_01_flags.getaway2a_thread_complete)do 
  663. 		thread_yield() 
  664. 	end 
  665. 	-- Increment the progress bar 
  666. 	guardian_angel_increment_node_progress() 
  667. 	 
  668. 	_A_GA_NW_01_threads.heli2b_thread = thread_new("_A_GA_NW_01_thread_heli2b") 
  669. 	_A_GA_NW_01_threads.getaway2b_thread = thread_new("_A_GA_NW_01_thread_getaway2b") 
  670. 	_A_GA_NW_01_SetupChase1b() 
  671. 	while not(_A_GA_NW_01_flags.getaway2b_thread_complete)do 
  672. 		thread_yield() 
  673. 	end 
  674. 	-- Increment the progress bar 
  675. 	guardian_angel_increment_node_progress() 
  676.  
  677. 	_A_GA_NW_01_threads.heli2c_thread = thread_new("_A_GA_NW_01_thread_heli2c") 
  678. 	_A_GA_NW_01_threads.getaway2c_thread = thread_new("_A_GA_NW_01_thread_getaway2c") 
  679. 	_A_GA_NW_01_SetupChase1c() 
  680. 	while not(_A_GA_NW_01_flags.getaway2c_thread_complete)do 
  681. 		thread_yield() 
  682. 	end 
  683. 	-- Increment the progress bar 
  684. 	guardian_angel_increment_node_progress() 
  685. 	--------------------------------------------------------- 
  686. 	-- End of Path 2 section 
  687. 	--------------------------------------------------------- 
  688.  
  689. 	----------------------------------------------------- 
  690. 	-- Path 3 section 
  691. 	----------------------------------------------------- 
  692. 	_A_GA_NW_01_threads.heli3a_thread = thread_new("_A_GA_NW_01_thread_heli3a") 
  693. 	_A_GA_NW_01_threads.getaway3a_thread = thread_new("_A_GA_NW_01_thread_getaway3a") 
  694. 	_A_GA_NW_01_SetupChase2a() 
  695. --	_A_GA_NW_01_SetupHeliChase() 
  696. 	while not(_A_GA_NW_01_flags.getaway3a_thread_complete)do 
  697. 		thread_yield() 
  698. 	end 
  699. 	-- Increment the progress bar 
  700. 	guardian_angel_increment_node_progress() 
  701.  
  702. 	_A_GA_NW_01_threads.heli3b_thread = thread_new("_A_GA_NW_01_thread_heli3b") 
  703. 	_A_GA_NW_01_threads.getaway3b_thread = thread_new("_A_GA_NW_01_thread_getaway3b") 
  704. 	_A_GA_NW_01_SetupChase2b() 
  705. 	while not(_A_GA_NW_01_flags.getaway3b_thread_complete)do 
  706. 		thread_yield() 
  707. 	end 
  708. 	-- Increment the progress bar 
  709. 	guardian_angel_increment_node_progress() 
  710.  
  711. 	_A_GA_NW_01_threads.heli3c_thread = thread_new("_A_GA_NW_01_thread_heli3c") 
  712. 	_A_GA_NW_01_threads.getaway3c_thread = thread_new("_A_GA_NW_01_thread_getaway3c") 
  713. 	_A_GA_NW_01_SetupChase2c() 
  714. 	while not(_A_GA_NW_01_flags.getaway3c_thread_complete)do 
  715. 		thread_yield() 
  716. 	end 
  717. 	-- Increment the progress bar 
  718. 	guardian_angel_increment_node_progress() 
  719.  
  720. 	_A_GA_NW_01_threads.heli3d_thread = thread_new("_A_GA_NW_01_thread_heli3d") 
  721. 	_A_GA_NW_01_threads.getaway3d_thread = thread_new("_A_GA_NW_01_thread_getaway3d") 
  722. 	_A_GA_NW_01_SetupChase2d() 
  723. 	while not(_A_GA_NW_01_flags.getaway3d_thread_complete)do 
  724. 		thread_yield() 
  725. 	end 
  726. 	-- Increment the progress bar 
  727. 	guardian_angel_increment_node_progress() 
  728. 	--------------------------------------------------------- 
  729. 	-- End of Path 3 section 
  730. 	--------------------------------------------------------- 
  731.  
  732. 	----------------------------------------------------- 
  733. 	-- Path 4 section 
  734. 	----------------------------------------------------- 
  735. 	_A_GA_NW_01_threads.heli4a_thread = thread_new("_A_GA_NW_01_thread_heli4a") 
  736. 	_A_GA_NW_01_threads.getaway4a_thread = thread_new("_A_GA_NW_01_thread_getaway4a") 
  737. 	_A_GA_NW_01_SetupChase3a() 
  738. 	while not(_A_GA_NW_01_flags.getaway4a_thread_complete)do 
  739. 		thread_yield() 
  740. 	end 
  741. 	-- Increment the progress bar 
  742. 	guardian_angel_increment_node_progress() 
  743.  
  744. 	_A_GA_NW_01_threads.heli4b_thread = thread_new("_A_GA_NW_01_thread_heli4b") 
  745. 	_A_GA_NW_01_threads.getaway4b_thread = thread_new("_A_GA_NW_01_thread_getaway4b") 
  746. 	_A_GA_NW_01_SetupChase3b() 
  747. 	while not(_A_GA_NW_01_flags.getaway4b_thread_complete)do 
  748. 		thread_yield() 
  749. 	end 
  750. 	-- Increment the progress bar 
  751. 	guardian_angel_increment_node_progress() 
  752.  
  753. 	_A_GA_NW_01_threads.heli4c_thread = thread_new("_A_GA_NW_01_thread_heli4c") 
  754. 	_A_GA_NW_01_threads.getaway4c_thread = thread_new("_A_GA_NW_01_thread_getaway4c") 
  755. 	_A_GA_NW_01_SetupChase3c() 
  756. 	while not(_A_GA_NW_01_flags.getaway4c_thread_complete)do 
  757. 		thread_yield() 
  758. 	end 
  759. 	-- Increment the progress bar 
  760. 	guardian_angel_increment_node_progress() 
  761.  
  762. 	_A_GA_NW_01_threads.heli4d_thread = thread_new("_A_GA_NW_01_thread_heli4d") 
  763. 	_A_GA_NW_01_threads.getaway4d_thread = thread_new("_A_GA_NW_01_thread_getaway4d") 
  764. 	_A_GA_NW_01_SetupChase3d() 
  765. 	while not(_A_GA_NW_01_flags.getaway4d_thread_complete)do 
  766. 		thread_yield() 
  767. 	end 
  768. 	-- Increment the progress bar 
  769. 	guardian_angel_increment_node_progress() 
  770. 	--------------------------------------------------------- 
  771. 	-- End of Path 4 section 
  772. 	--------------------------------------------------------- 
  773.  
  774. 	----------------------------------------------------- 
  775. 	-- Path 5 section 
  776. 	----------------------------------------------------- 
  777. 	_A_GA_NW_01_threads.heli5a_thread = thread_new("_A_GA_NW_01_thread_heli5a") 
  778. 	_A_GA_NW_01_threads.getaway5a_thread = thread_new("_A_GA_NW_01_thread_getaway5a") 
  779. 	_A_GA_NW_01_SetupChase4a() 
  780. 	while not(_A_GA_NW_01_flags.getaway5a_thread_complete)do 
  781. 		thread_yield() 
  782. 	end 
  783. 	-- Increment the progress bar 
  784. 	guardian_angel_increment_node_progress() 
  785.  
  786. 	_A_GA_NW_01_threads.heli5b_thread = thread_new("_A_GA_NW_01_thread_heli5b") 
  787. 	_A_GA_NW_01_threads.getaway5b_thread = thread_new("_A_GA_NW_01_thread_getaway5b") 
  788. 	_A_GA_NW_01_SetupChase4b() 
  789. 	while not(_A_GA_NW_01_flags.getaway5b_thread_complete)do 
  790. 		thread_yield() 
  791. 	end 
  792. 	-- Increment the progress bar 
  793. 	guardian_angel_increment_node_progress() 
  794.  
  795. 	_A_GA_NW_01_threads.heli5c_thread = thread_new("_A_GA_NW_01_thread_heli5c") 
  796. 	_A_GA_NW_01_threads.getaway5c_thread = thread_new("_A_GA_NW_01_thread_getaway5c") 
  797. 	_A_GA_NW_01_SetupChase4c() 
  798. 	while not(_A_GA_NW_01_flags.getaway5c_thread_complete)do 
  799. 		thread_yield() 
  800. 	end 
  801. 	-- Increment the progress bar 
  802. 	guardian_angel_increment_node_progress() 
  803. 	--------------------------------------------------------- 
  804. 	-- End of Path 5 section 
  805. 	--------------------------------------------------------- 
  806. --[[ 
  807. 	----------------------------------------------------- 
  808. 	-- Path 6 section 
  809. 	----------------------------------------------------- 
  810. 	_A_GA_NW_01_threads.heli6a_thread = thread_new("_A_GA_NW_01_thread_heli6a") 
  811. 	_A_GA_NW_01_threads.getaway6a_thread = thread_new("_A_GA_NW_01_thread_getaway6a") 
  812. 	_A_GA_NW_01_SetupChase5a() 
  813. 	while not(_A_GA_NW_01_flags.getaway6a_thread_complete)do 
  814. 		thread_yield() 
  815. 	end 
  816. 	-- Increment the progress bar 
  817. 	guardian_angel_increment_node_progress() 
  818.  
  819. 	_A_GA_NW_01_threads.heli6b_thread = thread_new("_A_GA_NW_01_thread_heli6b") 
  820. 	_A_GA_NW_01_threads.getaway6b_thread = thread_new("_A_GA_NW_01_thread_getaway6b") 
  821. 	_A_GA_NW_01_SetupChase5b() 
  822. 	while not(_A_GA_NW_01_flags.getaway6b_thread_complete)do 
  823. 		thread_yield() 
  824. 	end 
  825. 	-- Increment the progress bar 
  826. 	guardian_angel_increment_node_progress() 
  827.  
  828. 	_A_GA_NW_01_threads.heli6c_thread = thread_new("_A_GA_NW_01_thread_heli6c") 
  829. 	_A_GA_NW_01_threads.getaway6c_thread = thread_new("_A_GA_NW_01_thread_getaway6c") 
  830. 	while not(_A_GA_NW_01_flags.getaway6c_thread_complete)do 
  831. 		thread_yield() 
  832. 	end 
  833. 	-- Increment the progress bar 
  834. 	guardian_angel_increment_node_progress() 
  835.  
  836. 	_A_GA_NW_01_threads.heli6d_thread = thread_new("_A_GA_NW_01_thread_heli6d") 
  837. 	_A_GA_NW_01_threads.getaway6d_thread = thread_new("_A_GA_NW_01_thread_getaway6d") 
  838. 	while not(_A_GA_NW_01_flags.getaway6d_thread_complete)do 
  839. 		thread_yield() 
  840. 	end 
  841. 	-- Increment the progress bar 
  842. 	guardian_angel_increment_node_progress() 
  843. 	--------------------------------------------------------- 
  844. 	-- End of Path 6 section 
  845. 	--------------------------------------------------------- 
  846. 	]]-- 
  847. 	_A_GA_NW_01_flags.activity_thread_complete = true 
  848. 	_A_GA_NW_01_threads.activity_thread = -1 
  849. end 
  850.  
  851. function _A_GA_NW_01_thread_getaway1() 
  852. 	delay(1.0) 
  853. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway1_path, true, false) 
  854.  
  855. 	_A_GA_NW_01_flags.getaway1_thread_complete = true 
  856. 	_A_GA_NW_01_threads.getaway1_thread = -1 
  857. end 
  858.  
  859. function _A_GA_NW_01_thread_getaway2a() 
  860. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  861. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway2a_path, true, false) 
  862.  
  863. 	_A_GA_NW_01_flags.getaway2a_thread_complete = true 
  864. 	_A_GA_NW_01_threads.getaway2a_thread = -1 
  865. end 
  866. function _A_GA_NW_01_thread_getaway2b() 
  867. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  868. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway2b_path, true, false) 
  869.  
  870. 	_A_GA_NW_01_flags.getaway2b_thread_complete = true 
  871. 	_A_GA_NW_01_threads.getaway2b_thread = -1 
  872. end 
  873. function _A_GA_NW_01_thread_getaway2c() 
  874. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 25) 
  875. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway2c_path, true, false) 
  876.  
  877. 	_A_GA_NW_01_flags.getaway2c_thread_complete = true 
  878. 	_A_GA_NW_01_threads.getaway2c_thread = -1 
  879. end 
  880.  
  881. function _A_GA_NW_01_thread_getaway3a() 
  882. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 25) 
  883. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway3a_path, true, false) 
  884.  
  885. 	_A_GA_NW_01_flags.getaway3a_thread_complete = true 
  886. 	_A_GA_NW_01_threads.getaway3a_thread = -1 
  887. end 
  888. function _A_GA_NW_01_thread_getaway3b() 
  889. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  890. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway3b_path, true, false) 
  891.  
  892. 	_A_GA_NW_01_flags.getaway3b_thread_complete = true 
  893. 	_A_GA_NW_01_threads.getaway3b_thread = -1 
  894. end 
  895. function _A_GA_NW_01_thread_getaway3c() 
  896. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  897. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway3c_path, true, false) 
  898.  
  899. 	_A_GA_NW_01_flags.getaway3c_thread_complete = true 
  900. 	_A_GA_NW_01_threads.getaway3c_thread = -1 
  901. end 
  902. function _A_GA_NW_01_thread_getaway3d() 
  903. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 25) 
  904. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway3d_path, true, false) 
  905.  
  906. 	_A_GA_NW_01_flags.getaway3d_thread_complete = true 
  907. 	_A_GA_NW_01_threads.getaway3d_thread = -1 
  908. end 
  909.  
  910. function _A_GA_NW_01_thread_getaway4a() 
  911. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 25) 
  912. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway4a_path, true, false) 
  913.  
  914. 	_A_GA_NW_01_flags.getaway4a_thread_complete = true 
  915. 	_A_GA_NW_01_threads.getaway4a_thread = -1 
  916. end 
  917. function _A_GA_NW_01_thread_getaway4b() 
  918. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  919. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway4b_path, true, false) 
  920.  
  921. 	_A_GA_NW_01_flags.getaway4b_thread_complete = true 
  922. 	_A_GA_NW_01_threads.getaway4b_thread = -1 
  923. end 
  924. function _A_GA_NW_01_thread_getaway4c() 
  925. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  926. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway4c_path, true, false) 
  927.  
  928. 	_A_GA_NW_01_flags.getaway4c_thread_complete = true 
  929. 	_A_GA_NW_01_threads.getaway4c_thread = -1 
  930. end 
  931. function _A_GA_NW_01_thread_getaway4d() 
  932. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 25) 
  933. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway4d_path, true, false) 
  934.  
  935. 	_A_GA_NW_01_flags.getaway4d_thread_complete = true 
  936. 	_A_GA_NW_01_threads.getaway4d_thread = -1 
  937. end 
  938.  
  939. function _A_GA_NW_01_thread_getaway5a() 
  940. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 25) 
  941. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway5a_path, true, false) 
  942.  
  943. 	_A_GA_NW_01_flags.getaway5a_thread_complete = true 
  944. 	_A_GA_NW_01_threads.getaway5a_thread = -1 
  945. end 
  946. function _A_GA_NW_01_thread_getaway5b() 
  947. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  948. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway5b_path, true, false) 
  949.  
  950. 	_A_GA_NW_01_flags.getaway5b_thread_complete = true 
  951. 	_A_GA_NW_01_threads.getaway5b_thread = -1 
  952. end 
  953. function _A_GA_NW_01_thread_getaway5c() 
  954. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 25) 
  955. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway5c_path, true, false) 
  956.  
  957. 	_A_GA_NW_01_flags.getaway5c_thread_complete = true 
  958. 	_A_GA_NW_01_threads.getaway5c_thread = -1 
  959. end 
  960.  
  961. function _A_GA_NW_01_thread_getaway6a() 
  962. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  963. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway6a_path, true, false) 
  964.  
  965. 	_A_GA_NW_01_flags.getaway6a_thread_complete = true 
  966. 	_A_GA_NW_01_threads.getaway6a_thread = -1 
  967. end 
  968. function _A_GA_NW_01_thread_getaway6b() 
  969. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  970. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway6b_path, true, false) 
  971.  
  972. 	_A_GA_NW_01_flags.getaway6b_thread_complete = true 
  973. 	_A_GA_NW_01_threads.getaway6b_thread = -1 
  974. end 
  975. function _A_GA_NW_01_thread_getaway6c() 
  976. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 30) 
  977. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway6c_path, true, false) 
  978.  
  979. 	_A_GA_NW_01_flags.getaway6c_thread_complete = true 
  980. 	_A_GA_NW_01_threads.getaway6c_thread = -1 
  981. end 
  982. function _A_GA_NW_01_thread_getaway6d() 
  983. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 35) 
  984. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway6d_path, true, false) 
  985.  
  986. 	_A_GA_NW_01_flags.getaway6d_thread_complete = true 
  987. 	_A_GA_NW_01_threads.getaway6d_thread = -1 
  988. end 
  989.  
  990. function _A_GA_NW_01_thread_heli1() 
  991. 	--Give the players time to get into the helicopter 
  992. 	delay(9.0) 
  993.  
  994. 	guardian_angel_release_attack_groups() 
  995. 	 
  996. 	helicopter_fly_to_direct(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_paths.heli1_path) 
  997. 	 
  998. 	_A_GA_NW_01_flags.heli1_thread_complete = true 
  999. 	_A_GA_NW_01_threads.heli1_thread = -1 
  1000. end 
  1001.  
  1002. function _A_GA_NW_01_thread_heli2a() 
  1003. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli2a_path, 5) 
  1004.  
  1005. 	_A_GA_NW_01_flags.heli2a_thread_complete = true 
  1006. 	_A_GA_NW_01_threads.heli2a_thread = -1 
  1007. end 
  1008. function _A_GA_NW_01_thread_heli2b() 
  1009. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli2b_path, 5) 
  1010. 	 
  1011. 	_A_GA_NW_01_flags.heli2b_thread_complete = true 
  1012. 	_A_GA_NW_01_threads.heli2b_thread = -1 
  1013. end 
  1014. function _A_GA_NW_01_thread_heli2c() 
  1015. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1016. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli2c_path, 10) 
  1017. 	 
  1018. 	_A_GA_NW_01_flags.heli2c_thread_complete = true 
  1019. 	_A_GA_NW_01_threads.heli2c_thread = -1 
  1020. end 
  1021.  
  1022. function _A_GA_NW_01_thread_heli3a() 
  1023. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1024. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli3a_path, 5) 
  1025.  
  1026. 	_A_GA_NW_01_flags.heli3a_thread_complete = true 
  1027. 	_A_GA_NW_01_threads.heli3a_thread = -1 
  1028. end 
  1029. function _A_GA_NW_01_thread_heli3b() 
  1030. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1031. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli3b_path, 10) 
  1032.  
  1033. 	_A_GA_NW_01_flags.heli3b_thread_complete = true 
  1034. 	_A_GA_NW_01_threads.heli3b_thread = -1 
  1035. end 
  1036. function _A_GA_NW_01_thread_heli3c() 
  1037. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1038. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli3c_path, 5) 
  1039.  
  1040. 	_A_GA_NW_01_flags.heli3c_thread_complete = true 
  1041. 	_A_GA_NW_01_threads.heli3c_thread = -1 
  1042. end 
  1043. function _A_GA_NW_01_thread_heli3d() 
  1044. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1045. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli3d_path, 10) 
  1046.  
  1047. 	_A_GA_NW_01_flags.heli3d_thread_complete = true 
  1048. 	_A_GA_NW_01_threads.heli3d_thread = -1 
  1049. end 
  1050.  
  1051. function _A_GA_NW_01_thread_heli4a() 
  1052. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli4a_path, 10) 
  1053. 	 
  1054. 	_A_GA_NW_01_flags.heli4a_thread_complete = true 
  1055. 	_A_GA_NW_01_threads.heli4a_thread = -1 
  1056. end 
  1057. function _A_GA_NW_01_thread_heli4b() 
  1058. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1059. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli4b_path, 5) 
  1060. 	 
  1061. 	_A_GA_NW_01_flags.heli4b_thread_complete = true 
  1062. 	_A_GA_NW_01_threads.heli4b_thread = -1 
  1063. end 
  1064. function _A_GA_NW_01_thread_heli4c() 
  1065. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli4c_path, 5) 
  1066. 	 
  1067. 	_A_GA_NW_01_flags.heli4c_thread_complete = true 
  1068. 	_A_GA_NW_01_threads.heli4c_thread = -1 
  1069. end 
  1070. function _A_GA_NW_01_thread_heli4d() 
  1071. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1072. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli4d_path, 10) 
  1073. 	 
  1074. 	_A_GA_NW_01_flags.heli4d_thread_complete = true 
  1075. 	_A_GA_NW_01_threads.heli4d_thread = -1 
  1076. end 
  1077.  
  1078. function _A_GA_NW_01_thread_heli5a() 
  1079. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1080. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli5a_path, 10) 
  1081. 	 
  1082. 	_A_GA_NW_01_flags.heli5a_thread_complete = true 
  1083. 	_A_GA_NW_01_threads.heli5a_thread = -1 
  1084. end 
  1085. function _A_GA_NW_01_thread_heli5b() 
  1086. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1087. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli5b_path, 10) 
  1088. 	 
  1089. 	_A_GA_NW_01_flags.heli5b_thread_complete = true 
  1090. 	_A_GA_NW_01_threads.heli5b_thread = -1 
  1091. end 
  1092. function _A_GA_NW_01_thread_heli5c() 
  1093. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1094. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli5c_path, 5) 
  1095. 	 
  1096. 	_A_GA_NW_01_flags.heli5c_thread_complete = true 
  1097. 	_A_GA_NW_01_threads.heli5c_thread = -1 
  1098. end 
  1099.  
  1100. function _A_GA_NW_01_thread_heli6a() 
  1101. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1102. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli6a_path, 5) 
  1103. 	 
  1104. 	_A_GA_NW_01_flags.heli6a_thread_complete = true 
  1105. 	_A_GA_NW_01_threads.heli6a_thread = -1 
  1106. end 
  1107. function _A_GA_NW_01_thread_heli6b() 
  1108. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1109. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli6b_path, 5) 
  1110. 	 
  1111. 	_A_GA_NW_01_flags.heli6b_thread_complete = true 
  1112. 	_A_GA_NW_01_threads.heli6b_thread = -1 
  1113. end 
  1114. function _A_GA_NW_01_thread_heli6c() 
  1115. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1116. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli6c_path, 5) 
  1117. 	 
  1118. 	_A_GA_NW_01_flags.heli6c_thread_complete = true 
  1119. 	_A_GA_NW_01_threads.heli6c_thread = -1 
  1120. end 
  1121. function _A_GA_NW_01_thread_heli6d() 
  1122. 	helicopter_set_path_orientation(_A_GA_NW_01_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1123. 	helicopter_fly_to_direct_follow_dont_stop(_A_GA_NW_01_groups.heli_group.vehicle, -1, _A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.heli6d_path, 5) 
  1124. 	 
  1125. 	_A_GA_NW_01_flags.heli6d_thread_complete = true 
  1126. 	_A_GA_NW_01_threads.heli6d_thread = -1 
  1127. end 
  1128. -- ************************* 
  1129. -- 
  1130. -- Local functions 
  1131. -- 
  1132. -- ************************* 
  1133.  
  1134. -- This is called by _A_GA_NW_01_start(level_num) and handles setup for 
  1135. -- the level 1 instance. 
  1136. -- 
  1137. function _A_GA_NW_01_start_lvl_1() 
  1138. 	if not group_is_loaded(_A_GA_NW_01_groups.heli_group.name)then 
  1139. 		group_create(_A_GA_NW_01_groups.heli_group.name, true) 
  1140. 	end 
  1141. 	vehicle_enter_teleport(_A_GA_NW_01_groups.heli_group.chars[1], _A_GA_NW_01_groups.heli_group.vehicle, 0, true) 
  1142. 	vehicle_set_invulnerable(_A_GA_NW_01_groups.heli_group.vehicle) 
  1143. 	helicopter_fly_to_do(_A_GA_NW_01_groups.heli_group.vehicle, 2.0, true, _A_GA_NW_01_groups.heli_group.vehicle, false, "", 1.0, true) 
  1144. 	helicopters_set_jitter_override(0.01, 0.01) 
  1145. 	radio_block(_A_GA_NW_01_groups.heli_group.vehicle) 
  1146. 	npc_suppress_persona(_A_GA_NW_01_groups.heli_group.chars[1], true) 
  1147. end 
  1148. function _A_GA_NW_01_PickupKinzie() 
  1149. 	if not (group_is_loaded(_A_GA_NW_01_groups.getaway_group.name))then 
  1150. 		group_create(_A_GA_NW_01_groups.getaway_group.name, true) 
  1151. 	end 
  1152. 	vehicle_enter_teleport(_A_GA_NW_01_groups.getaway_group.chars[1], _A_GA_NW_01_groups.getaway_group.vehicle, 0, true) 
  1153. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.getaway_group.vehicle, true) 
  1154. 	vehicle_suppress_flipping(_A_GA_NW_01_groups.getaway_group.vehicle) 
  1155. 	vehicle_infinite_mass(_A_GA_NW_01_groups.getaway_group.vehicle) 
  1156. 	 
  1157. 	-- Make sure the driver doesn't die from splash damage. 
  1158. 	turn_invulnerable(_A_GA_NW_01_groups.getaway_group.chars[1]) 
  1159. 	 
  1160. 	delay(1.0) 
  1161. 	vehicle_pathfind_to(_A_GA_NW_01_groups.getaway_group.vehicle, _A_GA_NW_01_paths.getaway_pickup_path, true, true) 
  1162. 	 
  1163. end 
  1164. function _A_GA_NW_01_GetInCar() 
  1165. 	_A_GA_NW_01_convo.kinzie_picked_up.handle = audio_conversation_load(_A_GA_NW_01_convo.kinzie_picked_up.name)	 
  1166. 	audio_conversation_play(_A_GA_NW_01_convo.kinzie_picked_up.handle) 
  1167.  
  1168. 	on_vehicle_destroyed("_A_GA_NW_01_Car_Killed", _A_GA_NW_01_groups.getaway_group.vehicle) 
  1169. --	seat_number = 1 
  1170. --	for i, protectee in pairs (_A_GA_NW_01_groups.protectees.chars)do 
  1171. --		if not character_is_dead(_A_GA_NW_01_groups.protectees.chars[i])then 
  1172. --			npc_leash_remove(_A_GA_NW_01_groups.protectees.chars[i]) 
  1173. --			if (seat_number < 4) then 
  1174. 			while not (vehicle_enter(_A_GA_NW_01_groups.protectees.chars[1], _A_GA_NW_01_groups.getaway_group.vehicle, 1))do 
  1175. 				thread_yield() 
  1176. 			end 
  1177. 			 
  1178. --				seat_number = seat_number + 1 
  1179. 			while not(character_is_in_vehicle(_A_GA_NW_01_groups.protectees.chars[1], _A_GA_NW_01_groups.getaway_group.vehicle))do 
  1180. 				thread_yield() 
  1181. 			end 
  1182. --			end 
  1183. --		end 
  1184. --	end 
  1185. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.getaway_group.vehicle, true) 
  1186. 	vehicle_suppress_flipping(_A_GA_NW_01_groups.getaway_group.vehicle, true) 
  1187. 	vehicle_prevent_explosion_fling(_A_GA_NW_01_groups.getaway_group.vehicle, true) 
  1188. 	vehicle_infinite_mass(_A_GA_NW_01_groups.getaway_group.vehicle, true) 
  1189. 	vehicle_set_script_hard_goto(_A_GA_NW_01_groups.getaway_group.vehicle, true) 
  1190. 	vehicle_prevent_transition_to_ambient(_A_GA_NW_01_groups.getaway_group.vehicle, true) 
  1191. 	 
  1192. 	vehicle_speed_override(_A_GA_NW_01_groups.getaway_group.vehicle, 35) 
  1193. 	-- Set Kinzie invulnerable while she is in the car 
  1194. 	turn_invulnerable(_A_GA_NW_01_groups.protectees.chars[1]) 
  1195. 	-- Set unjackable 
  1196. 	set_unjackable_flag(_A_GA_NW_01_groups.getaway_group.vehicle, true) 
  1197. 	delay(1.0) 
  1198. end 
  1199.  
  1200. function _A_GA_NW_01_Heli_Pickup() 
  1201. 	-- Show the helicopter 
  1202. 	group_show(_A_GA_NW_01_groups.heli_group.name) 
  1203. 	camera_restrict_set_active(DISABLE) 
  1204. 	-- Fly to pickup the local player 
  1205. 	if (coop_is_active() == true) then 
  1206. 		if (is_rappelling(REMOTE_PLAYER)) then 
  1207. 			rappel_exit(REMOTE_PLAYER, false) 
  1208. 		end 
  1209. 		vehicle_enter_guardian_angel(REMOTE_PLAYER, _A_GA_NW_01_groups.heli_group.vehicle, 3) 
  1210. 	end 
  1211. 	 
  1212. 	if (is_rappelling(LOCAL_PLAYER)) then 
  1213. 		rappel_exit(LOCAL_PLAYER, false) 
  1214. 	end 
  1215. 	vehicle_enter_guardian_angel(LOCAL_PLAYER, _A_GA_NW_01_groups.heli_group.vehicle, 2) 
  1216. 	 
  1217. 	--delay(1.5) 
  1218. 	--Keep the helicopter somewhat level 
  1219. 	helicopter_set_max_bank_angle(_A_GA_NW_01_groups.heli_group.vehicle, 0.25) 
  1220. 	vehicle_speed_override(_A_GA_NW_01_groups.heli_group.vehicle, 60) 
  1221. end 
  1222.  
  1223. function _A_GA_NW_01_SetupHeliChase() 
  1224. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase_heli.name))then 
  1225. 		group_create(_A_GA_NW_01_groups.chase_heli.name) 
  1226. 		guardian_angel_register_script_group(_A_GA_NW_01_groups.chase_heli.name) 
  1227. 	end 
  1228. 	 
  1229. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase_heli.chars[1], _A_GA_NW_01_groups.chase_heli.vehicle, 0, true) 
  1230. 	 
  1231. 	while not(character_is_in_vehicle(_A_GA_NW_01_groups.chase_heli.chars[1], _A_GA_NW_01_groups.chase_heli.vehicle))do 
  1232. 		thread_yield() 
  1233. 	end 
  1234. 	vehicle_chase(_A_GA_NW_01_groups.chase_heli.vehicle, _A_GA_NW_01_groups.getaway_group.chars[1]) 
  1235. 	--delay(2.0) 
  1236. 	--helicopter_fly_to_set_goal_direction(_A_GA_NW_01_groups.chase_heli.vehicle, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1237. 	--helicopter_go_to_set_target(_A_GA_NW_01_groups.chase_heli.vehicle, _A_GA_NW_01_groups.getaway_group.vehicle) 
  1238.  
  1239. 	_A_GA_NW_01_convo.enemy_heli.handle = audio_conversation_load(_A_GA_NW_01_convo.enemy_heli.name)	 
  1240. 	audio_conversation_play(_A_GA_NW_01_convo.enemy_heli.handle) 
  1241.  
  1242. end 
  1243.  
  1244. function _A_GA_NW_01_SetupChase1a() 
  1245. 	if not (group_is_loaded(_A_GA_NW_01_groups.chase1.name))then 
  1246. 		group_create(_A_GA_NW_01_groups.chase1.name, true) 
  1247. 	end 
  1248. 	if not (group_is_loaded(_A_GA_NW_01_groups.chase2.name))then 
  1249. 		group_create(_A_GA_NW_01_groups.chase2.name, true) 
  1250. 	end 
  1251. 	 
  1252. 	 
  1253. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase1.chars[1], _A_GA_NW_01_groups.chase1.vehicle, 0, true) 
  1254. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase1.chars[2], _A_GA_NW_01_groups.chase1.vehicle, 1, true) 
  1255. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase2.chars[1], _A_GA_NW_01_groups.chase2.vehicle, 0, true) 
  1256. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase2.chars[2], _A_GA_NW_01_groups.chase2.vehicle, 1, true) 
  1257. 	 
  1258. 	-- Set drivers invulnerable while they are in the car 
  1259. 	turn_invulnerable(_A_GA_NW_01_groups.chase1.chars[1]) 
  1260. 	turn_invulnerable(_A_GA_NW_01_groups.chase2.chars[1]) 
  1261. 	 
  1262. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase1.vehicle) 
  1263. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase2.vehicle) 
  1264. 	 
  1265. 	-- Suppress exiting the vehicle 
  1266. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase1.vehicle, true) 
  1267. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase2.vehicle, true) 
  1268. 	 
  1269. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase1.name) 
  1270. 	vehicle_chase(_A_GA_NW_01_groups.chase1.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1271. 	delay(4.0) 
  1272. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase2.name) 
  1273. 	vehicle_chase(_A_GA_NW_01_groups.chase2.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1274. end 
  1275. function _A_GA_NW_01_SetupChase1b() 
  1276. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase3.name))then 
  1277. 		group_create(_A_GA_NW_01_groups.chase3.name, true) 
  1278. 	end 
  1279. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase4.name))then 
  1280. 		group_create(_A_GA_NW_01_groups.chase4.name, true) 
  1281. 	end 
  1282. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase5.name))then 
  1283. 		group_create(_A_GA_NW_01_groups.chase5.name, true) 
  1284. 	end 
  1285. 	 
  1286. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase3.chars[1], _A_GA_NW_01_groups.chase3.vehicle, 0, true) 
  1287. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase3.chars[2], _A_GA_NW_01_groups.chase3.vehicle, 1, true) 
  1288. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase4.chars[1], _A_GA_NW_01_groups.chase4.vehicle, 0, true) 
  1289. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase4.chars[2], _A_GA_NW_01_groups.chase4.vehicle, 1, true) 
  1290. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase5.chars[1], _A_GA_NW_01_groups.chase5.vehicle, 0, true) 
  1291. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase5.chars[2], _A_GA_NW_01_groups.chase5.vehicle, 1, true) 
  1292.  
  1293. 	-- Set drivers invulnerable while they are in the car 
  1294. 	turn_invulnerable(_A_GA_NW_01_groups.chase3.chars[1]) 
  1295. 	turn_invulnerable(_A_GA_NW_01_groups.chase4.chars[1]) 
  1296. 	turn_invulnerable(_A_GA_NW_01_groups.chase5.chars[1]) 
  1297. 	 
  1298. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase3.vehicle) 
  1299. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase4.vehicle) 
  1300. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase5.vehicle) 
  1301. 	 
  1302. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase3.vehicle, true) 
  1303. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase4.vehicle, true) 
  1304. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase5.vehicle, true) 
  1305. 	 
  1306. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase3.name) 
  1307. 	vehicle_chase(_A_GA_NW_01_groups.chase3.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1308. 	delay(3) 
  1309. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase4.name) 
  1310. 	vehicle_chase(_A_GA_NW_01_groups.chase4.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1311. 	delay(3) 
  1312. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase5.name) 
  1313. 	vehicle_chase(_A_GA_NW_01_groups.chase5.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1314. end 
  1315. function _A_GA_NW_01_SetupChase1c() 
  1316.  
  1317. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase6.name))then 
  1318. 		group_create(_A_GA_NW_01_groups.chase6.name, true) 
  1319. 	end 
  1320. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase7.name))then 
  1321. 		group_create(_A_GA_NW_01_groups.chase7.name, true) 
  1322. 	end 
  1323. 	 
  1324. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase6.chars[1], _A_GA_NW_01_groups.chase6.vehicle, 0, true) 
  1325. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase6.chars[2], _A_GA_NW_01_groups.chase6.vehicle, 1, true) 
  1326. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase7.chars[1], _A_GA_NW_01_groups.chase7.vehicle, 0, true) 
  1327. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase7.chars[2], _A_GA_NW_01_groups.chase7.vehicle, 1, true) 
  1328.  
  1329. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase6.vehicle) 
  1330. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase7.vehicle) 
  1331. 	 
  1332. 	-- Set drivers invulnerable while they are in the car 
  1333. 	turn_invulnerable(_A_GA_NW_01_groups.chase6.chars[1]) 
  1334. 	turn_invulnerable(_A_GA_NW_01_groups.chase7.chars[1]) 
  1335. 	 
  1336. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase6.vehicle, true) 
  1337. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase7.vehicle, true) 
  1338. 	 
  1339. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase6.name) 
  1340. 	vehicle_chase(_A_GA_NW_01_groups.chase6.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1341. 	delay(2) 
  1342. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase7.name) 
  1343. 	vehicle_chase(_A_GA_NW_01_groups.chase7.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1344. end 
  1345.  
  1346. function _A_GA_NW_01_SetupChase2a() 
  1347. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase8.name))then 
  1348. 		group_create(_A_GA_NW_01_groups.chase8.name, true) 
  1349. 	end 
  1350. 	 
  1351. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase8.chars[1], _A_GA_NW_01_groups.chase8.vehicle, 0, true) 
  1352. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase8.chars[2], _A_GA_NW_01_groups.chase8.vehicle, 1, true) 
  1353.  
  1354. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase8.vehicle) 
  1355. 	 
  1356. 	-- Set drivers invulnerable while they are in the car 
  1357. 	turn_invulnerable(_A_GA_NW_01_groups.chase8.chars[1]) 
  1358. 	 
  1359. 	-- Suppress exiting the vehicle 
  1360. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase8.vehicle, true) 
  1361.  
  1362. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase8.name) 
  1363. 	vehicle_chase(_A_GA_NW_01_groups.chase8.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1364. end 
  1365. function _A_GA_NW_01_SetupChase2b() 
  1366. 	-- APC chase!!! 
  1367. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase9.name))then 
  1368. 		group_create(_A_GA_NW_01_groups.chase9.name, true) 
  1369. 	end 
  1370. 	 
  1371. 	 
  1372. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase9.chars[1], _A_GA_NW_01_groups.chase9.vehicle, 0, true) 
  1373. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase9.chars[2], _A_GA_NW_01_groups.chase9.vehicle, 1, true) 
  1374.  
  1375. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase9.vehicle) 
  1376. 	 
  1377. 	-- Set drivers invulnerable while they are in the car 
  1378. 	turn_invulnerable(_A_GA_NW_01_groups.chase9.chars[1]) 
  1379. 	 
  1380. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase9.vehicle, true) 
  1381. 	 
  1382. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase9.name) 
  1383. 	vehicle_chase(_A_GA_NW_01_groups.chase9.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1384. end 
  1385. function _A_GA_NW_01_SetupChase2c() 
  1386. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase10.name))then 
  1387. 		group_create(_A_GA_NW_01_groups.chase10.name, true) 
  1388. 	end 
  1389.  
  1390. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase10.chars[1], _A_GA_NW_01_groups.chase10.vehicle, 0, true) 
  1391. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase10.chars[2], _A_GA_NW_01_groups.chase10.vehicle, 1, true) 
  1392.  
  1393. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase10.vehicle) 
  1394. 	 
  1395. 	-- Set drivers invulnerable while they are in the car 
  1396. --	turn_invulnerable(_A_GA_NW_01_groups.chase10.chars[1]) 
  1397. 	 
  1398. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase10.vehicle, true) 
  1399. 	 
  1400. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase10.name) 
  1401. 	vehicle_chase(_A_GA_NW_01_groups.chase10.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1402. end 
  1403. function _A_GA_NW_01_SetupChase2d() 
  1404. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase11.name))then 
  1405. 		group_create(_A_GA_NW_01_groups.chase11.name, true) 
  1406. 	end 
  1407. 	 
  1408. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase11.chars[1], _A_GA_NW_01_groups.chase11.vehicle, 0, true) 
  1409. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase11.chars[2], _A_GA_NW_01_groups.chase11.vehicle, 1, true) 
  1410. 	 
  1411. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase11.vehicle) 
  1412. 	 
  1413. 	-- Set drivers invulnerable while they are in the car 
  1414. 	turn_invulnerable(_A_GA_NW_01_groups.chase11.chars[1]) 
  1415. 	 
  1416. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase11.vehicle, true) 
  1417.  
  1418. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase11.name) 
  1419. 	vehicle_chase(_A_GA_NW_01_groups.chase11.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true)	 
  1420. end 
  1421.  
  1422. function _A_GA_NW_01_SetupChase3a() 
  1423. 	-- Another APC chase 
  1424. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase12.name))then 
  1425. 		group_create(_A_GA_NW_01_groups.chase12.name, true) 
  1426. 	end 
  1427. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase13.name))then 
  1428. 		group_create(_A_GA_NW_01_groups.chase13.name, true) 
  1429. 	end 
  1430. 	 
  1431. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase12.chars[1], _A_GA_NW_01_groups.chase12.vehicle, 0, true) 
  1432. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase12.chars[2], _A_GA_NW_01_groups.chase12.vehicle, 1, true) 
  1433. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase13.chars[1], _A_GA_NW_01_groups.chase13.vehicle, 0, true) 
  1434. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase13.chars[2], _A_GA_NW_01_groups.chase13.vehicle, 1, true) 
  1435. 	 
  1436. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase12.vehicle) 
  1437. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase13.vehicle) 
  1438. 	 
  1439. 	-- Set drivers invulnerable while they are in the car 
  1440. 	turn_invulnerable(_A_GA_NW_01_groups.chase12.chars[1]) 
  1441. 	turn_invulnerable(_A_GA_NW_01_groups.chase13.chars[1]) 
  1442. 	 
  1443. 	-- Suppress exiting the vehicle 
  1444. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase12.vehicle, true) 
  1445. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase13.vehicle, true) 
  1446. 	 
  1447. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase12.name) 
  1448. 	vehicle_chase(_A_GA_NW_01_groups.chase12.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1449. --	delay(4.0) 
  1450. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase13.name) 
  1451. 	vehicle_chase(_A_GA_NW_01_groups.chase13.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1452. end 
  1453. function _A_GA_NW_01_SetupChase3b() 
  1454. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase14.name))then 
  1455. 		group_create(_A_GA_NW_01_groups.chase14.name, true) 
  1456. 	end 
  1457. 	 
  1458. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase14.chars[1], _A_GA_NW_01_groups.chase14.vehicle, 0, true) 
  1459. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase14.chars[2], _A_GA_NW_01_groups.chase14.vehicle, 1, true) 
  1460. 	 
  1461. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase14.vehicle) 
  1462. 	 
  1463. 	-- Set drivers invulnerable while they are in the car 
  1464. 	turn_invulnerable(_A_GA_NW_01_groups.chase14.chars[1]) 
  1465. 	 
  1466. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase14.vehicle, true) 
  1467. 	 
  1468. --	delay(4.0) 
  1469. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase14.name) 
  1470. 	vehicle_chase(_A_GA_NW_01_groups.chase14.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1471. end 
  1472. function _A_GA_NW_01_SetupChase3c() 
  1473. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase15.name))then 
  1474. 		group_create(_A_GA_NW_01_groups.chase15.name, true) 
  1475. 	end 
  1476. 	 
  1477. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase15.chars[1], _A_GA_NW_01_groups.chase15.vehicle, 0, true) 
  1478. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase15.chars[2], _A_GA_NW_01_groups.chase15.vehicle, 1, true) 
  1479.  
  1480. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase15.vehicle) 
  1481. 	 
  1482. 	-- Set drivers invulnerable while they are in the car 
  1483. 	turn_invulnerable(_A_GA_NW_01_groups.chase15.chars[1]) 
  1484. 	 
  1485. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase15.vehicle, true) 
  1486. 	 
  1487. --	delay(4.0) 
  1488. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase15.name) 
  1489. 	vehicle_chase(_A_GA_NW_01_groups.chase15.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1490. end 
  1491. function _A_GA_NW_01_SetupChase3d() 
  1492. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase16.name))then 
  1493. 		group_create(_A_GA_NW_01_groups.chase16.name, true) 
  1494. 	end 
  1495. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase17.name))then 
  1496. 		group_create(_A_GA_NW_01_groups.chase17.name, true) 
  1497. 	end 
  1498. 	 
  1499. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase16.chars[1], _A_GA_NW_01_groups.chase16.vehicle, 0, true) 
  1500. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase16.chars[2], _A_GA_NW_01_groups.chase16.vehicle, 1, true) 
  1501. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase17.chars[1], _A_GA_NW_01_groups.chase17.vehicle, 0, true) 
  1502. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase17.chars[2], _A_GA_NW_01_groups.chase17.vehicle, 1, true) 
  1503.  
  1504. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase16.vehicle) 
  1505. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase17.vehicle) 
  1506. 		 
  1507. 	-- Set drivers invulnerable while they are in the car 
  1508. 	turn_invulnerable(_A_GA_NW_01_groups.chase16.chars[1]) 
  1509. 	turn_invulnerable(_A_GA_NW_01_groups.chase17.chars[1]) 
  1510. 	 
  1511. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase16.vehicle, true) 
  1512. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase17.vehicle, true) 
  1513. 	 
  1514. --	delay(4.0) 
  1515. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase16.name) 
  1516. 	vehicle_chase(_A_GA_NW_01_groups.chase16.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1517. 	delay(4.0) 
  1518. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase17.name) 
  1519. 	vehicle_chase(_A_GA_NW_01_groups.chase17.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1520. end 
  1521.  
  1522. function _A_GA_NW_01_SetupChase4a() 
  1523. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase18.name))then 
  1524. 		group_create(_A_GA_NW_01_groups.chase18.name, true) 
  1525. 	end 
  1526. 	 
  1527. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase18.chars[1], _A_GA_NW_01_groups.chase18.vehicle, 0, true) 
  1528. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase18.chars[2], _A_GA_NW_01_groups.chase18.vehicle, 1, true) 
  1529.  
  1530. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase18.vehicle) 
  1531. 	 
  1532. 	-- Set drivers invulnerable while they are in the car 
  1533. 	turn_invulnerable(_A_GA_NW_01_groups.chase18.chars[1]) 
  1534. 	 
  1535. 	-- Suppress exiting the vehicle 
  1536. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase18.vehicle, true) 
  1537. 	 
  1538. 	 
  1539. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase18.name) 
  1540. 	vehicle_chase(_A_GA_NW_01_groups.chase18.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1541. end 
  1542. function _A_GA_NW_01_SetupChase4b() 
  1543. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase19.name))then 
  1544. 		group_create(_A_GA_NW_01_groups.chase19.name, true) 
  1545. 	end 
  1546. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase20.name))then 
  1547. 		group_create(_A_GA_NW_01_groups.chase20.name, true) 
  1548. 	end 
  1549. 	 
  1550. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase19.chars[1], _A_GA_NW_01_groups.chase19.vehicle, 0, true) 
  1551. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase19.chars[2], _A_GA_NW_01_groups.chase19.vehicle, 1, true) 
  1552. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase20.chars[1], _A_GA_NW_01_groups.chase20.vehicle, 0, true) 
  1553. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase20.chars[2], _A_GA_NW_01_groups.chase20.vehicle, 1, true) 
  1554.  
  1555. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase19.vehicle) 
  1556. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase20.vehicle) 
  1557. 	 
  1558. 	-- Set drivers invulnerable while they are in the car 
  1559. 	turn_invulnerable(_A_GA_NW_01_groups.chase19.chars[1]) 
  1560. 	turn_invulnerable(_A_GA_NW_01_groups.chase20.chars[1]) 
  1561. 	 
  1562. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase19.vehicle, true) 
  1563. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase20.vehicle, true) 
  1564. 	 
  1565. --	delay(4.0) 
  1566. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase19.name) 
  1567. 	vehicle_chase(_A_GA_NW_01_groups.chase19.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1568. 	delay(4.0) 
  1569. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase20.name) 
  1570. 	vehicle_chase(_A_GA_NW_01_groups.chase20.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1571. 	delay(4.0) 
  1572. end 
  1573. function _A_GA_NW_01_SetupChase4c() 
  1574. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase21.name))then 
  1575. 		group_create(_A_GA_NW_01_groups.chase21.name, true) 
  1576. 	end 
  1577. 	 
  1578. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase21.chars[1], _A_GA_NW_01_groups.chase21.vehicle, 0, true) 
  1579. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase21.chars[2], _A_GA_NW_01_groups.chase21.vehicle, 1, true) 
  1580.  
  1581. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase21.vehicle) 
  1582. 	 
  1583. 	-- Set drivers invulnerable while they are in the car 
  1584. 	turn_invulnerable(_A_GA_NW_01_groups.chase21.chars[1]) 
  1585. 	 
  1586. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase21.vehicle, true) 
  1587. 	 
  1588. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase21.name) 
  1589. 	vehicle_chase(_A_GA_NW_01_groups.chase21.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1590. end 
  1591.  
  1592. function _A_GA_NW_01_SetupChase5a() 
  1593. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase22.name))then 
  1594. 		group_create(_A_GA_NW_01_groups.chase22.name, true) 
  1595. 	end 
  1596. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase23.name))then 
  1597. 		group_create(_A_GA_NW_01_groups.chase23.name, true) 
  1598. 	end 
  1599. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase24.name))then 
  1600. 		group_create(_A_GA_NW_01_groups.chase24.name, true) 
  1601. 	end 
  1602. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase25.name))then 
  1603. 		group_create(_A_GA_NW_01_groups.chase25.name, true) 
  1604. 	end 
  1605. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase26.name))then 
  1606. 		group_create(_A_GA_NW_01_groups.chase26.name, true) 
  1607. 	end 
  1608. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase27.name))then 
  1609. 		group_create(_A_GA_NW_01_groups.chase27.name, true) 
  1610. 	end 
  1611. 	if not(group_is_loaded(_A_GA_NW_01_groups.chase28.name))then 
  1612. 		group_create(_A_GA_NW_01_groups.chase28.name, true) 
  1613. 	end 
  1614. 	 
  1615. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase22.vehicle) 
  1616. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase23.vehicle) 
  1617. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase24.vehicle) 
  1618. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase25.vehicle) 
  1619. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase26.vehicle) 
  1620. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase27.vehicle) 
  1621. 	on_vehicle_destroyed("_A_GA_NW_01_Enemy_Car_Killed", _A_GA_NW_01_groups.chase28.vehicle) 
  1622. 	 
  1623. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase22.chars[1], _A_GA_NW_01_groups.chase22.vehicle, 0, true) 
  1624. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase22.chars[2], _A_GA_NW_01_groups.chase22.vehicle, 1, true) 
  1625. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase23.chars[1], _A_GA_NW_01_groups.chase23.vehicle, 0, true) 
  1626. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase23.chars[2], _A_GA_NW_01_groups.chase23.vehicle, 1, true) 
  1627. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase24.chars[1], _A_GA_NW_01_groups.chase24.vehicle, 0, true) 
  1628. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase24.chars[2], _A_GA_NW_01_groups.chase24.vehicle, 1, true) 
  1629. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase25.chars[1], _A_GA_NW_01_groups.chase25.vehicle, 0, true) 
  1630. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase25.chars[2], _A_GA_NW_01_groups.chase25.vehicle, 1, true) 
  1631. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase26.chars[1], _A_GA_NW_01_groups.chase26.vehicle, 0, true) 
  1632. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase26.chars[2], _A_GA_NW_01_groups.chase26.vehicle, 1, true) 
  1633. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase27.chars[1], _A_GA_NW_01_groups.chase27.vehicle, 0, true) 
  1634. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase27.chars[2], _A_GA_NW_01_groups.chase27.vehicle, 1, true) 
  1635. 	vehicle_enter_teleport(_A_GA_NW_01_groups.chase28.chars[1], _A_GA_NW_01_groups.chase28.vehicle, 0, true) 
  1636. --	vehicle_enter_teleport(_A_GA_NW_01_groups.chase28.chars[2], _A_GA_NW_01_groups.chase28.vehicle, 1, true) 
  1637.  
  1638. 	-- Suppress exiting the vehicle 
  1639. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase22.vehicle, true) 
  1640. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase23.vehicle, true) 
  1641. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase24.vehicle, true) 
  1642. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase25.vehicle, true) 
  1643. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase26.vehicle, true) 
  1644. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase27.vehicle, true) 
  1645. 	vehicle_suppress_npc_exit(_A_GA_NW_01_groups.chase28.vehicle, true) 
  1646.  
  1647. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase22.name) 
  1648. 	vehicle_chase(_A_GA_NW_01_groups.chase22.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1649. 	delay(4.0) 
  1650. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase23.name) 
  1651. 	vehicle_chase(_A_GA_NW_01_groups.chase23.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1652. 	delay(4.0) 
  1653. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase24.name) 
  1654. 	vehicle_chase(_A_GA_NW_01_groups.chase24.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1655. 	delay(4.0) 
  1656. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase25.name) 
  1657. 	vehicle_chase(_A_GA_NW_01_groups.chase25.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1658. 	delay(4.0) 
  1659. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase26.name) 
  1660. 	vehicle_chase(_A_GA_NW_01_groups.chase26.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1661. 	delay(4.0) 
  1662. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase27.name) 
  1663. 	vehicle_chase(_A_GA_NW_01_groups.chase27.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1664. 	delay(4.0) 
  1665. 	guardian_angel_register_script_group(_A_GA_NW_01_groups.chase28.name) 
  1666. 	vehicle_chase(_A_GA_NW_01_groups.chase28.vehicle, _A_GA_NW_01_groups.protectees.chars[1], false, true) 
  1667. end 
  1668. function _A_GA_NW_01_SetupChase5b() 
  1669. end 
  1670.  
  1671. function _A_GA_NW_01_Car_Killed() 
  1672. 	marker_remove(_A_GA_NW_01_groups.getaway_group.vehicle) 
  1673. 	on_vehicle_destroyed("", _A_GA_NW_01_groups.getaway_group.vehicle) 
  1674. 	character_kill(_A_GA_NW_01_groups.protectees.chars[1], true) 
  1675. 	character_kill(_A_GA_NW_01_groups.getaway_group.chars[1], true) 
  1676. end 
  1677.  
  1678. -- Callback for when one of the chase vehicles is destroyed 
  1679. -- 
  1680. -- vehicle_name:	(string) name of the vehicle 
  1681. -- 
  1682. function _A_GA_NW_01_Enemy_Car_Killed(vehicle_name) 
  1683. 	-- clear our callback 
  1684. 	on_vehicle_destroyed("", vehicle_name) 
  1685. 	-- figure out what vehicle it is 
  1686. 	for i, chase_group in pairs(_A_GA_NW_01_all_chase_groups) do 
  1687. 		if chase_group.vehicle == vehicle_name then 
  1688. 			-- Kill the driver 
  1689. 			turn_vulnerable(chase_group.chars[1]) 
  1690. 			character_kill(chase_group.chars[1]) 
  1691. 			-- Get out of the loop 
  1692. 			return 
  1693. 		end 
  1694. 	end 
  1695. end 
  1696.  
  1697. -- Cleanup all callbacks if leaving activity 
  1698. -- 
  1699. function _A_GA_NW_01_Cleanup_Chase_Callbacks() 
  1700. end 
  1701.