./mintroshakes.lua

  1. --[[ 
  2.  
  3.             _____       _             _____ _           _              
  4.            |_   _|     | |           / ____| |         | |             
  5.   _ __ ___   | |  _ __ | |_ _ __ ___| (___ | |__   __ _| | _____  ___  
  6.  | '_ ` _ \  | | | '_ \| __| '__/ _ \\___ \| '_ \ / _` | |/ / _ \/ __| 
  7.  | | | | | |_| |_| | | | |_| | | (_) |___) | | | | (_| |   <  __/\__ \ 
  8.  |_| |_| |_|_____|_| |_|\__|_|  \___/_____/|_| |_|\__,_|_|\_\___||___/ 
  9.                                                                        
  10.                                                                        
  11. 											   
  12.  
  13. --]] 
  14.  
  15. --[[ 
  16. 	mIntroShakes.lua 
  17. 	SRG Map Event Script 
  18. 	DATE: 2014-05-05 
  19. 	AUTHOR:	Kevin Tyska 
  20. ]]-- 
  21.  
  22. -- Tweakable Parameters -- 
  23.  
  24.  
  25. -------------------------------------------------------------------------------------------------- 
  26. --[[ 
  27.  
  28.    _____                            
  29.   / ____|                           
  30.  | |  __ _ __ ___  _   _ _ __  ___  
  31.  | | |_ | '__/ _ \| | | | '_ \/ __| 
  32.  | |__| | | | (_) | |_| | |_) \__ \ 
  33.   \_____|_|  \___/ \__,_| .__/|___/ 
  34. 						| |         
  35. 						|_|         
  36.  
  37. ]]-- 
  38. -------------------------------------------------------------------------------------------------- 
  39. 	mIntroShakes_group = { 
  40.   
  41. 		shakespeare_npc = { 
  42. 			name = "shakespeare_npc", 
  43. 			npcs = { "shakespeare<001>" }, 
  44. 			shakes = "shakespeare<001>", 
  45. 		}, 
  46.  
  47. 		--ENEMY GROUPS 
  48. 		--WAVE ONE 
  49. 		entrance_demons = { 
  50. 			name = "entrance_group", 
  51. 			members = {	"entrance<001>", "entrance<002>", "entrance<003>" }, 
  52. 			destination = "entrance_nav", 
  53. 		}, 
  54.  
  55. 		sniper_01 = { 
  56. 			name = "sniper_01_group", 
  57. 			members = {	"sniper<001>" }, 
  58. 		}, 
  59.  
  60. 		imps_01 = { 
  61. 			name = "imp_01_group", 
  62. 			members = {	"imp_01<001>", "imp_01<002>", "imp_01<003>", "imp_01<004>", "imp_01<005>", "imp_01<006>", "imp_01<007>", "imp_01<008>" }, 
  63. 		}, 
  64. 		 
  65. 		--WAVE TWO 
  66. 		bar_demons = { 
  67. 			name = "w2_bar_group", 
  68. 			members = {	"w2_bar_grunts<001>", "w2_bar_grunts<002>" }, 
  69. 			destination = "bar_group_nav", 
  70. 		}, 
  71.  
  72. 		winged_01 = { 
  73. 			name = "w2_winged_group", 
  74. 			members = {	"w2_winged<001>" }, 
  75. 		}, 
  76.  
  77. 		inciters_01 = { 
  78. 			name = "Inciter_group_01", 
  79. 			members = {	"inciter_01<001>" }, 
  80. 		}, 
  81.  
  82. 		SAM_Grunt = { 
  83. 			name = "sam_grunt_01", 
  84. 			sam =  "sam_grunt<001>", 
  85. 		}, 
  86.  
  87. 		--WAVE THREE 
  88. 		bar_demons_02 = { 
  89. 			name = "w3_bar_group", 
  90. 			members = {	"w3_bar_grunts<001>", "w3_bar_grunts<002>", "w3_bar_grunts<003>", "w3_bar_grunts<004>" }, 
  91. 			destination = "bar_group_02_nav", 
  92. 		}, 
  93.  
  94. 		balcony_demons = { 
  95. 			name = "balcony_group_01", 
  96. 			members = {	"balcony_grunts<001>", "balcony_grunts<002>"}, 
  97. 			destination = "balcony_nav_01", 
  98. 		}, 
  99.  
  100. 		imps_02 = { 
  101. 			name = "imp_02_group", 
  102. 			members = {	"imp_02<001>", "imp_02<002>", "imp_02<003>", "imp_02<004>", "imp_02<005>", "imp_02<006>", "imp_02<007>", "imp_02<008>", "imp_02<009>", "imp_02<010>" }, 
  103. 		}, 
  104.  
  105. 		sniper_02 = { 
  106. 			name = "sniper_02_group", 
  107. 			members = {	"sniper<002>" }, 
  108. 		}, 
  109.  
  110. 		--WAVE FOUR 
  111. 		inciters_02 = { 
  112. 			name = "Inciter_group_02", 
  113. 			members = {	"inciter_02<001>" }, 
  114. 		}, 
  115.  
  116. 		winged_02 = { 
  117. 			name = "w4_winged_group", 
  118. 			members = {	"w4_winged<001>", "w4_winged<002>" }, 
  119. 		}, 
  120.  
  121. 		vip_demons = { 
  122. 			name = "vip_group", 
  123. 			members = {	"vip_grunt<001>"}, 
  124. 			destination = "vip_nav", 
  125. 		}, 
  126.  
  127. 		sniper_03 = { 
  128. 			name = "sniper_03_group", 
  129. 			members = {	"sniper<003>" }, 
  130. 		}, 
  131.  
  132. 		--WAVE FIVE 
  133. 		bosses = { 
  134. 			name = "boss_group", 
  135. 			members = {	"boss<001>", "boss<002>" }, 
  136. 		}, 
  137.  
  138. 	} 
  139.  
  140. -------------------------------------------------------------------------------------------------- 
  141. --[[ 
  142.  
  143.   _   _                         _       _        
  144.  | \ | |                       (_)     | |       
  145.  |  \| | __ ___   ___ __   ___  _ _ __ | |_ ___  
  146.  | . ` |/ _` \ \ / / '_ \ / _ \| | '_ \| __/ __| 
  147.  | |\  | (_| |\ V /| |_) | (_) | | | | | |_\__ \ 
  148.  |_| \_|\__,_| \_/ | .__/ \___/|_|_| |_|\__|___/ 
  149. 				   | |                           
  150. 				   |_|                           
  151.  
  152. ]]-- 
  153. --------------------------------------------------------------------------------------------------	 
  154.  
  155. 	mIntroShakes_navpoints = { 
  156.  
  157. 		shadow_nav_1 = { "sniper_leash<001>", "sniper_leash<002>", "sniper_leash<003>", "sniper_leash<003>" }, 
  158. 		shadow_nav_2 = { "sniper_leash_02<001>", "sniper_leash_02<002>", "sniper_leash_02<003>", "sniper_leash_02<004>" },	 
  159. 		shadow_nav_3 = { "sniper_leash_03<001>", "sniper_leash_03<002>", "sniper_leash_03<003>", "sniper_leash_03<004>" },	 
  160. 					 
  161. 	} 
  162. -------------------------------------------------------------------------------------------------- 
  163. --[[ 
  164.  
  165.   _______ _                        _      
  166.  |__   __| |                      | |     
  167. 	| |  | |__  _ __ ___  __ _  __| |___  
  168. 	| |  | '_ \| '__/ _ \/ _` |/ _` / __| 
  169. 	| |  | | | | | |  __/ (_| | (_| \__ \ 
  170. 	|_|  |_| |_|_|  \___|\__,_|\__,_|___/ 
  171. 										  
  172. 										  
  173. ]]-- 
  174. -------------------------------------------------------------------------------------------------- 
  175. 	mIntroShakes_thread = { 
  176.  
  177. 	} 
  178.  
  179. -------------------------------------------------------------------------------------------------- 
  180. --[[ 
  181. 				 _             _   _           _        _____        _         
  182. 	 /\         (_)           | \ | |         | |      |  __ \      | |        
  183. 	/  \   _ __  _ _ __ ___   |  \| | ___   __| | ___  | |  | | __ _| |_ __ _  
  184.    / /\ \ | '_ \| | '_ ` _ \  | . ` |/ _ \ / _` |/ _ \ | |  | |/ _` | __/ _` | 
  185.   / ____ \| | | | | | | | | | | |\  | (_) | (_| |  __/ | |__| | (_| | || (_| | 
  186.  /_/    \_\_| |_|_|_| |_| |_| |_| \_|\___/ \__,_|\___| |_____/ \__,_|\__\__,_| 
  187. 																			   
  188. ]]-- 
  189. --------------------------------------------------------------------------------------------------      
  190.  
  191. 	mIntroShakes_anim_node = { 
  192.  
  193. 	}	                                                                   
  194.  
  195. -------------------------------------------------------------------------------------------------- 
  196. --[[ 
  197.  
  198.    _____ _               _                _       _        
  199.   / ____| |             | |              (_)     | |       
  200.  | |    | |__   ___  ___| | ___ __   ___  _ _ __ | |_ ___  
  201.  | |    | '_ \ / _ \/ __| |/ / '_ \ / _ \| | '_ \| __/ __| 
  202.  | |____| | | |  __/ (__|   <| |_) | (_) | | | | | |_\__ \ 
  203.   \_____|_| |_|\___|\___|_|\_\ .__/ \___/|_|_| |_|\__|___/ 
  204. 							 | |                           
  205. 							 |_|                           
  206.  
  207. ]]-- 
  208. -------------------------------------------------------------------------------------------------- 
  209. 	mIntroShakes_checkpoint = { 
  210. 		{ 
  211. 			name = MISSION_START_CHECKPOINT,					-- First Checkpoint Shakespeare SAM(sam) 
  212. 			init = "mIntroShakes_sam_init", 
  213. 			run = "mIntroShakes_sam_run", 
  214. 			cleanup = "mIntroShakes_sam_cleanup", 
  215. 			next_checkpoint = "Shakespeare_Dance_Battle", 
  216. 			host_start = "player_start_host", 
  217. 			client_start = "player_start_client", 
  218. 			p1_car_nav = "", 
  219. 			p2_car_nav = "", 
  220. 			start_groups = {  }, 
  221. 			cp_only_groups = {}, 
  222. 		}, 
  223.  
  224. 		{ 
  225. 			name = "Shakespeare_Dance_Battle",					-- First Checkpoint Shakespeare Dance Battle(sdb) 
  226. 			init = "mIntroShakes_sdb_init", 
  227. 			run = "mIntroShakes_sdb_run", 
  228. 			cleanup = "mIntroShakes_sdb_cleanup", 
  229. 			next_checkpoint = "nil", 
  230. 			host_start = "player_start_host", 
  231. 			client_start = "player_start_client", 
  232. 			p1_car_nav = "", 
  233. 			p2_car_nav = "", 
  234. 			start_groups = {  }, 
  235. 			cp_only_groups = {}, 
  236. 		}, 
  237. 	} 
  238. 	 
  239. -------------------------------------------------------------------------------------------------- 
  240. --[[ 
  241.  
  242.    _____      _                                 
  243.   / ____|    | |                                
  244.  | |    _   _| |_ ___  ___ ___ _ __   ___  ___  
  245.  | |   | | | | __/ __|/ __/ _ \ '_ \ / _ \/ __| 
  246.  | |___| |_| | |_\__ \ (_|  __/ | | |  __/\__ \ 
  247.   \_____\__,_|\__|___/\___\___|_| |_|\___||___/ 
  248. 											    
  249. 											    
  250. ]]-- 
  251. -------------------------------------------------------------------------------------------------- 
  252. 	mIntroShakes_scene = { 
  253. 		intro = "", 
  254. 		outro = "Bink_Shakespeare_Confronted" 
  255. 	} 
  256.  
  257. -------------------------------------------------------------------------------------------------- 
  258. --[[ 
  259.  
  260.    _____                                    _   _                  
  261.   / ____|                                  | | (_)                 
  262.  | |     ___  _ ____   _____ _ __ ___  __ _| |_ _  ___  _ __  ___  
  263.  | |    / _ \| '_ \ \ / / _ \ '__/ __|/ _` | __| |/ _ \| '_ \/ __| 
  264.  | |___| (_) | | | \ V /  __/ |  \__ \ (_| | |_| | (_) | | | \__ \ 
  265.   \_____\___/|_| |_|\_/ \___|_|  |___/\__,_|\__|_|\___/|_| |_|___/ 
  266. 																   
  267. 																   
  268. ]]-- 
  269. -------------------------------------------------------------------------------------------------- 
  270.  
  271. 	mIntroShakes_persona = {  
  272. 		Johnny = { 
  273. 			persona_name = "Johnny_Gat", 
  274. 			persona_id = INVALID_PERSONA_HANDLE 
  275. 		}, 
  276. 		Kinzie = { 
  277. 			persona_name = "Kinzie", 
  278. 			persona_id = INVALID_PERSONA_HANDLE 
  279. 		}, 
  280. 		Shakespeare = { 
  281. 			persona_name = "Shakespeare", 
  282. 			persona_id = INVALID_PERSONA_HANDLE 
  283. 		}, 
  284.  
  285. 	} 
  286.  
  287. 	mIntroShakes_convo = { 
  288. 		--[[ = { 
  289. 			name = "file_name without voice (_bm, _wm, _bf...", 
  290. 			player_talks = true or false, 
  291. 			handle = INVALID_CONVERSATION_HANDLE, 
  292. 			convo_thread = INVALID_THREAD_HANDLE, 
  293. 			max_wait_seconds = 60,	-- if the conversation doesn't complete before this time, kill it 
  294. 			timer_thread = INVALID_THREAD_HANDLE, 
  295. 			priority = CONVO_PRIORITY_HIGH or CONVO_PRIORITY_NORMAL or CONVO_PRIORITY_OPTIONAL 
  296. 			(optional) persona_line = true,	-- this is a single line 
  297. 			(required if persona_line) speaker_name = "name of speaker",	-- single line speaker (might be set before call to play is made?) 
  298. 			(optional)phone_call = true,  -- this is a phone conversation (phone persona must be preloaded) 
  299. 			(required if phone_call) receiving_call = true or false  -- auto-answer is always true in missions (until proven otherwise) 
  300. 			 
  301. 		},]] 
  302. 		 
  303. 		shake_comment_01 = { 
  304. 			name = "mission_intro_ss_battle_comment_01", 
  305. 			player_talks = false, 
  306. 			handle = INVALID_CONVERSATION_HANDLE, 
  307. 			convo_thread = INVALID_THREAD_HANDLE, 
  308. 			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
  309. 			timer_thread = INVALID_THREAD_HANDLE, 
  310. 			priority = CONVO_PRIORITY_NORMAL, 
  311. 			persona_line = true, 
  312. 			speaker_name = mIntroShakes_group.shakespeare_npc.shakes, 
  313. 		},	 
  314.  
  315. 		shake_comment_02 = { 
  316. 			name = "mission_intro_ss_battle_comment_02", 
  317. 			player_talks = false, 
  318. 			handle = INVALID_CONVERSATION_HANDLE, 
  319. 			convo_thread = INVALID_THREAD_HANDLE, 
  320. 			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
  321. 			timer_thread = INVALID_THREAD_HANDLE, 
  322. 			priority = CONVO_PRIORITY_NORMAL, 
  323. 			persona_line = true, 
  324. 			speaker_name = mIntroShakes_group.shakespeare_npc.shakes, 
  325. 		},	 
  326.  
  327. 		shake_more_guys = { 
  328. 			name = "mission_intro_ss_more_enemies", 
  329. 			player_talks = false, 
  330. 			handle = INVALID_CONVERSATION_HANDLE, 
  331. 			convo_thread = INVALID_THREAD_HANDLE, 
  332. 			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
  333. 			timer_thread = INVALID_THREAD_HANDLE, 
  334. 			priority = CONVO_PRIORITY_NORMAL, 
  335. 			persona_line = true, 
  336. 			speaker_name = mIntroShakes_group.shakespeare_npc.shakes, 
  337. 		},	 
  338.  
  339. 		shake_challenge = { 
  340. 			name = "mission_intro_ss_challenge", 
  341. 			player_talks = false, 
  342. 			handle = INVALID_CONVERSATION_HANDLE, 
  343. 			convo_thread = INVALID_THREAD_HANDLE, 
  344. 			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
  345. 			timer_thread = INVALID_THREAD_HANDLE, 
  346. 			priority = CONVO_PRIORITY_NORMAL, 
  347. 			persona_line = true, 
  348. 			speaker_name = mIntroShakes_group.shakespeare_npc.shakes, 
  349. 		},	 
  350.  
  351. 		shake_battle_end = { 
  352. 			name = "mission_intro_ss_battle_end", 
  353. 			player_talks = false, 
  354. 			handle = INVALID_CONVERSATION_HANDLE, 
  355. 			convo_thread = INVALID_THREAD_HANDLE, 
  356. 			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
  357. 			timer_thread = INVALID_THREAD_HANDLE, 
  358. 			priority = CONVO_PRIORITY_NORMAL, 
  359. 			persona_line = true, 
  360. 			speaker_name = mIntroShakes_group.shakespeare_npc.shakes, 
  361. 		},	 
  362.  
  363. 		shake_grant_power = { 
  364. 			name = "Grant_Power", 
  365. 			player_talks = false, 
  366. 			handle = INVALID_CONVERSATION_HANDLE, 
  367. 			convo_thread = INVALID_THREAD_HANDLE, 
  368. 			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
  369. 			timer_thread = INVALID_THREAD_HANDLE, 
  370. 			priority = CONVO_PRIORITY_NORMAL, 
  371. 			persona_line = true, 
  372. 			speaker_name = mIntroShakes_group.shakespeare_npc.shakes, 
  373. 		},	 
  374.  
  375. 	} 
  376. 	 
  377. 	mIntroShakes_convo_queue = { 
  378. 		--[[start_drive_queue = {  
  379. 			{ delay = 2.0, convo = mIntroShakes_convo.goto_first_checkpoint_nav }, 
  380. 			{ delay = 4.0, convo = mIntroShakes_convo.goto_first_checkpoint_nav2 }, 
  381. 			{ delay = 3.0, convo = mIntroShakes_convo.goto_first_checkpoint_nav3 }, 
  382. 			{ delay = 5.0, convo = mIntroShakes_convo.goto_first_checkpoint_nav4 } 
  383. 		}, 
  384. 		]]-- 
  385. 	} 
  386. 	 
  387. -------------------------------------------------------------------------------------------------- 
  388. --[[ 
  389.  
  390.   _______   _                            
  391.  |__   __| (_)                           
  392. 	| |_ __ _  __ _  __ _  ___ _ __ ___  
  393. 	| | '__| |/ _` |/ _` |/ _ \ '__/ __| 
  394. 	| | |  | | (_| | (_| |  __/ |  \__ \ 
  395. 	|_|_|  |_|\__, |\__, |\___|_|  |___/ 
  396. 			   __/ | __/ |               
  397. 			  |___/ |___/                
  398.  
  399. ]]-- 
  400. -------------------------------------------------------------------------------------------------- 
  401. 	mIntroShakes_trigger = { 
  402. 		-- = { 
  403. 		--	name = "_trigger", 
  404. 		--	hit = false, 
  405. 		-- 	last_hit_by = nil, -- 	last_hit_human = nil (set to the last human to enter the trigger in the default trigger callback) 
  406. 		--  (optional)callback = "mIntroShakes_function_name_cb" 
  407. 		--	(optional)marker = TRIGGER_LOCATION or TRIGGER_USE or custom or don't include for no marker 
  408. 		--  (optional)waypoint = true, 
  409. 		--  (optional)teleport_to = { 
  410. 		--						host = "host_nav", 
  411. 		--						client = "client_nav"  
  412. 		--					},		 
  413. 		--	(optional)conversation = mIntroShakes_convo.convo_name  -- play a conversation 
  414. 		--	(optional)next_trigger = "next_trigger_name" sets up next trigger when triggered (breadcrumbs) 
  415. 		--}, 
  416. 		 
  417.  
  418. 	} 
  419. 	 
  420. -------------------------------------------------------------------------------------------------- 
  421. 																	  --[[ INTERROGATION DATA ]]-- 
  422. -------------------------------------------------------------------------------------------------- 
  423. 	--mIntroShakes_interrogate = { 
  424. 	--	leader = { 
  425. 	--		target = mIntroShakes_group.friendly_fire.owner, 
  426. 	--		persona = "Interrogation", 
  427. 	--		objective = "mIntroShakes_INTERROGATE_OWNER", 
  428. 	--	--	(optional)conversation = mIntroShakes_convo.convo_name  -- play a conversation while interrogating 
  429. 	--	}, 
  430. 	--} 
  431. 		 
  432. -------------------------------------------------------------------------------------------------- 
  433. --[[ 
  434.  
  435.    ____  _   _                
  436.   / __ \| | | |               
  437.  | |  | | |_| |__   ___ _ __  
  438.  | |  | | __| '_ \ / _ \ '__| 
  439.  | |__| | |_| | | |  __/ |    
  440.   \____/ \__|_| |_|\___|_|    
  441. 							  
  442. 							  
  443. ]]-- 
  444. -------------------------------------------------------------------------------------------------- 
  445.  
  446. 	mIntroShakes_homie = { 
  447.  
  448. 	} 
  449. 	 
  450. 	mIntroShakes_tweakables = { 
  451.  
  452. 	} 
  453.  
  454.  
  455.  
  456. 	mIntroShakes_runtime = { 
  457. 		inciter_intro_sam_complete = false, 
  458. 		shakespeare_sam_complete = false, 
  459. 	} 
  460.  
  461. 	mIntroShakes_VFX = 
  462. 	{ 
  463. 		power_up = { name = "vfx_Altars_PowerUp", handle = "" }, 
  464. 	} 
  465.  
  466. -------------------------------------------------------------------------------------------------- 
  467. 																				--[[ MOVERS ]]-- 
  468. --------------------------------------------------------------------------------------------------\ 
  469.  
  470. mIntroShakes_movers = { 
  471.  
  472. 	door_01 = { 
  473. 		mover = "door<001>", 
  474. 	}, 
  475.  
  476. 	door_02 = { 
  477. 		mover = "door<002>", 
  478. 	}, 
  479.  
  480. } 
  481.  
  482. -------------------------------------------------------------------------------------------------- 
  483. --[[ 
  484.  
  485.    _____ _                  _               _   ______                _   _                  
  486.   / ____| |                | |             | | |  ____|              | | (_)                 
  487.  | (___ | |_ __ _ _ __   __| | __ _ _ __ __| | | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  488.   \___ \| __/ _` | '_ \ / _` |/ _` | '__/ _` | |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  489.   ____) | || (_| | | | | (_| | (_| | | | (_| | | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  490.  |_____/ \__\__,_|_| |_|\__,_|\__,_|_|  \__,_| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  491. 																							 
  492. 																							 
  493. ]]-- 
  494.  
  495. -- This is the primary entry point for the mission, and is responsible for starting up the mission 
  496. -- at the specified checkpoint. 
  497. -- CALLED FROM CODE 
  498. -- 
  499. -- start_checkpoint_name:	(string) The checkpoint the mission should begin at 
  500. -- is_restart:					(bool) TRUE if the mission is restarting, FALSE otherwise 
  501. -- 
  502. function mIntroShakes_start(start_checkpoint_name, is_restart) 
  503.  
  504.  
  505. 	mission_start_fade_out(0.0) 
  506.  
  507. 	set_ped_override_density(.1) 
  508. 	set_traffic_density(.1) 
  509. 	parking_spot_disable_all(true) 
  510. 	-- initialize systems 
  511. 	mission_startup(mIntroShakes_trigger, mIntroShakes_convo) -- mIntroShakes_checkpoint 
  512. 	 
  513. 	-- HVS_BDF: we don't necessarily want to call load_persona() because this creates a 2D 
  514. 	-- version, which can prevent actual in-game characters from lip syncing their VO if 
  515. 	-- the 2D persona was loaded prior to their character being spawned. 
  516. 	-- In the case of PC characters, they are present in the world  
  517. 	-- and their characters should lip sync their VO. 
  518. 	--load_persona(mIntro_persona.Johnny) 
  519. 	--load_persona(mIntro_persona.Kinzie) 
  520. 	 
  521. 	local start_cp = get_table_by_name(mIntroShakes_checkpoint, MISSION_START_CHECKPOINT) 
  522.  
  523. 	-- TEMPORARY: give player approximate loadout of weapons & superpowers 
  524. 	-- TODO: remove this before the game ships!!! 
  525. 	--hvUnlockLoadout("mIntroShakes") 
  526.  
  527. 	-- Check if this mission starting from the beginning 
  528. 	if (start_checkpoint_name == start_cp.name) then 
  529. 		if (is_restart == false and mIntroShakes_scene.intro ~= "") then 
  530. 			-- First time playing mission 
  531. 			local fade_in_after = false 
  532. 			cutscene_play(mIntroShakes_scene.intro, nil, {start_cp.host_start, start_cp.client_start}, fade_in_after) 
  533. 		else 
  534. 			teleport_coop(start_cp.host_start, start_cp.client_start, true, false, false)--HVS_RCK - Adding false for stick_to_ground. Fixes being stuck in floor on client 
  535. 		end 
  536. 		fade_out(0) 
  537. 	end 
  538.  
  539. 	-- Handle mission initialization for the current checkpoint 
  540. 	mIntroShakes_initialize(start_checkpoint_name) 
  541.  
  542. 	-- Run the mission from the current checkpoint 
  543. 	checkpoint_run_mission(mIntroShakes_checkpoint, start_checkpoint_name) 
  544. 	 
  545. 	mission_end_success("mIntroShakes") --, mIntroShakes_scene.outro, {"player_start_host", "player_start_client"}) 
  546. end 
  547.  
  548. -- This is the primary function responsible for cleaning up the entire mission 
  549. -- CALLED FROM CODE (+++MUST RETURN IMMEDIATELY+++) 
  550. -- 
  551. function mIntroShakes_cleanup() 
  552. 	--[[ INSERT ANY MISSION SPECIFIC CLEAN-UP ]]-- 
  553.  
  554. 	set_ped_override_density(-1) 
  555. 	set_traffic_density(1) 
  556. 	parking_spot_disable_all(false) 
  557. 	-- cleanup all threads 
  558. 	cleanup_threads(mIntroShakes_thread) 
  559. 	 
  560. 	-- run checkpoint cleanups (move into mission_shutdown?) 
  561. 	checkpoint_cleanup_mission(mIntroShakes_checkpoint) 
  562. 	 
  563. 	-- cleanup triggers, convos, kill_list and interrogations 
  564. 	mission_shutdown() 
  565. 	 
  566. 	-- cleanup all groups 
  567. 	cleanup_groups(mIntroShakes_group) 
  568.  
  569. 	notoriety_set_min_and_max("police", 0, MAX_NOTORIETY_LEVEL) 
  570. 	notoriety_reset("police") 
  571. 	notoriety_set_can_decay(true) 
  572. 	spawning_allow_cop_ambient_spawns(true) 
  573. 	roadblocks_enable(true) 
  574.  
  575.     on_seamless_animated_moment_end("") 
  576.     seamless_animated_moment_cleanup() 
  577.  
  578. 	if not mission_is_failed() then 
  579. 		player_unlock_super_power( 1) 
  580. 		if coop_is_active() then 
  581. 			player_unlock_super_power( 1 , REMOTE_PLAYER) 
  582. 		end 
  583. 	end 
  584.  
  585. 	door_lock( mIntroShakes_movers.door_01.mover, false ) 
  586. 	door_lock( mIntroShakes_movers.door_02.mover, false ) 
  587.  
  588. 	spawning_vehicles(true)  
  589.  
  590. end 
  591.  
  592. -- Called when the mission has ended with success 
  593. -- CALLED FROM CODE (+++MUST RETURN IMMEDIATELY+++) 
  594. -- 
  595. function mIntroShakes_success() 
  596. 	--[[ INSERT ANY MISSION SPECIFIC SUCCESS STUFF ]]-- 
  597.  
  598. 	player_super_power_select( "stomp", SYNC_ALL, "force" ) 
  599. 	 
  600. end 
  601.  
  602. -------------------------------------------------------------------------------------------------- 
  603. --[[ 
  604.  
  605.  
  606.   _____       _ _   _       _ _           ______                _   _                  
  607.  |_   _|     (_) | (_)     | (_)         |  ____|              | | (_)                 
  608.    | |  _ __  _| |_ _  __ _| |_ _______  | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  609.    | | | '_ \| | __| |/ _` | | |_  / _ \ |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  610.   _| |_| | | | | |_| | (_| | | |/ /  __/ | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  611.  |_____|_| |_|_|\__|_|\__,_|_|_/___\___| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  612. 																					   
  613. 																					   
  614. ]]-- 
  615.  
  616. -- Initialize the mission for the specified checkpoint 
  617. -- 
  618. -- checkpoint_name:		(string) Checkpoint to initialize the mission to 
  619. -- 
  620. function mIntroShakes_initialize(checkpoint_name) 
  621. 	-- Common initialization 
  622. 	mIntroShakes_initialize_common() 
  623.  
  624. 	 
  625. 	-- Checkpoint specific initialization 
  626. 	checkpoint_init(mIntroShakes_checkpoint, checkpoint_name) 
  627.  
  628. 	-- Remove any present subtitles 
  629. 	message_remove_all() 
  630.  
  631. 	-- Start fading in  
  632. 	mission_start_fade_in() 
  633. end 
  634.  
  635. -- Handle any common initialization 
  636. -- 
  637. function mIntroShakes_initialize_common() 
  638. 	--[[ INSERT ANY COMMON INITIALIZATION CODE HERE ]]-- 
  639. 	notoriety_set_min_and_max("police", 0, 1) 
  640. 	 
  641. 	spawning_allow_cop_ambient_spawns(false) 
  642. 	roadblocks_enable(false) 
  643.  
  644. 	door_lock( mIntroShakes_movers.door_01.mover, true ) 
  645. 	door_lock( mIntroShakes_movers.door_02.mover, true ) 
  646.  
  647. end 
  648.  
  649. -------------------------------------------------------------------------------------------------- 
  650. --[[ 
  651.  
  652.  
  653.    _____ _               _                _       _     ______                _   _                  
  654.   / ____| |             | |              (_)     | |   |  ____|              | | (_)                 
  655.  | |    | |__   ___  ___| | ___ __   ___  _ _ __ | |_  | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  656.  | |    | '_ \ / _ \/ __| |/ / '_ \ / _ \| | '_ \| __| |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  657.  | |____| | | |  __/ (__|   <| |_) | (_) | | | | | |_  | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  658.   \_____|_| |_|\___|\___|_|\_\ .__/ \___/|_|_| |_|\__| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  659. 							 | |                                                                     
  660. 							 |_|                                                                     
  661.  
  662. ]]-- 
  663. -------------------------------------------------------------------------------------------------- 
  664. -------------------------------------------------------------------------------------------------- 
  665. --[[ 
  666.  
  667.    _____ _           _                                         _____                         ____        _   _   _       
  668.   / ____| |         | |                                       |  __ \                       |  _ \      | | | | | |      
  669.  | (___ | |__   __ _| | _____  ___ _ __   ___  __ _ _ __ ___  | |  | | __ _ _ __   ___ ___  | |_) | __ _| |_| |_| | ___  
  670.   \___ \| '_ \ / _` | |/ / _ \/ __| '_ \ / _ \/ _` | '__/ _ \ | |  | |/ _` | '_ \ / __/ _ \ |  _ < / _` | __| __| |/ _ \ 
  671.   ____) | | | | (_| |   <  __/\__ \ |_) |  __/ (_| | | |  __/ | |__| | (_| | | | | (_|  __/ | |_) | (_| | |_| |_| |  __/ 
  672.  |_____/|_| |_|\__,_|_|\_\___||___/ .__/ \___|\__,_|_|  \___| |_____/ \__,_|_| |_|\___\___| |____/ \__,_|\__|\__|_|\___| 
  673.                                   | |                                                                                    
  674.                                   |_|                                                                                    
  675.        
  676. ]]-- 
  677. -------------------------------------------------------------------------------------------------- 
  678.  
  679. -- Initialize this checkpoint. 
  680. -- 
  681. -- mission_start: (bool) Whether we're initializing from a mission (re)start or from 
  682. --					a natural play-through. 
  683.  
  684. function mIntroShakes_sam_init(mission_start) 
  685.  
  686. 	fade_out(0.0)	 
  687. 			 
  688. 	audio_object_post_event("Play_shakes") 
  689. 	audio_object_post_event("Play_MKing_Shakespeare_Intro") 
  690. 	audio_object_post_event("Play_Mission_Checkpoint_Icon_Stop") 
  691.  
  692. 	group_create( mIntroShakes_group.shakespeare_npc.name, true ) 
  693. 	-- HVS_BDF: let's see if a brief delay is enough to improve the reliability of Shakespeare 
  694. 	-- being ready on the client for the SAM... 
  695. 	delay(0.01) 
  696. 	--Shakespeare SAM 
  697. 	local actor_list = { LOCAL_PLAYER, mIntroShakes_group.shakespeare_npc.shakes } 
  698. 	seamless_animated_moment_prep("SAM_shkspr_intro", actor_list) 
  699. 	on_seamless_animated_moment_end("SAM_shkspr_intro_complete") 
  700. 	seamless_animated_moment_start("SAM_shkspr_intro", actor_list) 
  701.  
  702. 	fade_in(0.2) 
  703.  
  704. 	--Wait until the SAM has completed 
  705.     while(mIntroShakes_runtime.shakespeare_sam_complete == false) do 
  706.          thread_yield() 
  707. 	end 
  708. 	 
  709. 	on_seamless_animated_moment_end("") 
  710.  
  711. end 
  712. 								 
  713. -- The next objective 
  714. -- 
  715. function mIntroShakes_sam_run() 
  716.  
  717. 	objective_text_clear(0) 
  718.  
  719. end 
  720.  
  721. -- Do any cleanup for this checkpoint. 
  722. -- 
  723. -- (+++THIS IS CALLED FROM MISSION CLEANUP, MUST RETURN IMMEDIATELY+++) 
  724. -- 
  725. -- mission_exit: (bool) Whether we're exiting the mission entirely, or just 
  726. --					moving on to the next checkpoint. 
  727. -- 
  728. function mIntroShakes_sam_cleanup(mission_exit) 
  729.  
  730. 	if mission_exit then 
  731. 		spawning_allow_cop_ambient_spawns(true) 
  732. 		roadblocks_enable(true)	 
  733. 	end 
  734.  
  735. end 
  736.  
  737. -- 
  738. function mIntroShakes_sdb_init(mission_start) 
  739. 	 
  740. 	notoriety_set_min_and_max("police", 0, 0) 
  741. 	notoriety_set("police", 0) 
  742. 	spawning_allow_cop_ambient_spawns(false) 
  743.  
  744. 	if mission_start then 
  745.  
  746. 		group_create( mIntroShakes_group.shakespeare_npc.name, true ) 
  747.  
  748. 	end 
  749.  
  750. end 
  751. 								 
  752. -- The next objective 
  753. -- 
  754. function mIntroShakes_sdb_run() 
  755.  
  756. 	spawning_vehicles(false)  
  757.  
  758. 	set_ignore_ai_flag(mIntroShakes_group.shakespeare_npc.shakes, true) 
  759. 	set_animation_state(mIntroShakes_group.shakespeare_npc.npcs[1], "djvc djing") 
  760. 	character_set_animation_overrides(mIntroShakes_group.shakespeare_npc.npcs[1],"djvc djing") 
  761.  
  762. 	--npc_leash_to_nav(mIntroShakes_group.shakespeare_npc.shakes, "shakes_anchor", 0.1, false) 
  763.  
  764. 	turn_invulnerable(mIntroShakes_group.shakespeare_npc.npcs[1]) 
  765. 	character_allow_ragdoll(mIntroShakes_group.shakespeare_npc.npcs[1], false) 
  766. 	character_prevent_flinching(mIntroShakes_group.shakespeare_npc.npcs[1], true) 
  767. 	character_prevent_bumping(mIntroShakes_group.shakespeare_npc.npcs[1], true) 
  768.  
  769. 	human_gravity_enable(mIntroShakes_group.shakespeare_npc.npcs[1], false) 
  770. 	character_collision_enable (mIntroShakes_group.shakespeare_npc.npcs[1], false) 
  771. 	character_enable_superpower_immunity(mIntroShakes_group.shakespeare_npc.npcs[1], true) 
  772. 	character_enable_supersprint_immunity(mIntroShakes_group.shakespeare_npc.npcs[1], true) 
  773.  
  774. 	--HVS_BAS - horrible hack, but this dude needs to stay PUT! 
  775. 	local x = -576.85 
  776. 	local y = 65.74 
  777. 	local z = -862.57  
  778. 	set_human_pos(mIntroShakes_group.shakespeare_npc.npcs[1],x,y,z) 
  779. 	objective_text( 0, "", "GM_INTRO_KILL_DEMONS", "", SYNC_ALL, OI_ASSET_KILL ) 
  780.  
  781. 	convo_start( mIntroShakes_convo.shake_comment_01 )	 
  782.  
  783. 	--WAVE ONE 
  784. 	mIntroShakes_attack( mIntroShakes_group.entrance_demons ) 
  785.  
  786. 	delay(.2) 
  787. 	set_human_pos(mIntroShakes_group.shakespeare_npc.npcs[1],x,y,z) 
  788. 	kill_list_wait_for_complete() 
  789.  
  790. 	--sub-wave for sniper 
  791. 	group_create( mIntroShakes_group.sniper_01.name, true ) 
  792. 	kill_list_add( mIntroShakes_group.sniper_01.members, OI_ASSET_KILL ) 
  793. 	human_use_teleport_navpoints(mIntroShakes_group.sniper_01.members[1], true) 
  794.  
  795. 	--use set navpoints for shadow demon 
  796. 	mIntroShakes_set_shadow_navs(mIntroShakes_navpoints.shadow_nav_1) 
  797. 	delay(.2) 
  798. 	set_human_pos(mIntroShakes_group.shakespeare_npc.npcs[1],x,y,z) 
  799.  
  800. 	kill_list_wait_for_complete() 
  801.  
  802. 	--WAVE TWO 
  803. 	convo_start( mIntroShakes_convo.shake_more_guys )	 
  804.  
  805. 	--mIntroShakes_attack( mIntroShakes_group.vip_demons ) 
  806.  
  807. 	group_create( mIntroShakes_group.winged_02.name, true ) 
  808. 	kill_list_add( mIntroShakes_group.winged_02.members, OI_ASSET_KILL ) 
  809.  
  810. 	group_create( mIntroShakes_group.winged_01.name, true ) 
  811. 	kill_list_add( mIntroShakes_group.winged_01.members, OI_ASSET_KILL ) 
  812.  
  813. 	kill_list_wait_for_complete() 
  814.  
  815. 	--WAVE THREE 
  816. 	convo_start( mIntroShakes_convo.shake_comment_02 )	 
  817.  
  818. 	--mIntroShakes_attack( mIntroShakes_group.bar_demons_02 ) 
  819.  
  820.  
  821. 	group_create( mIntroShakes_group.sniper_02.name, true ) 
  822.  
  823. 	human_use_teleport_navpoints(mIntroShakes_group.sniper_02.members[1], true) 
  824.  
  825. 	--use set navpoints for shadow demon 
  826. 	mIntroShakes_set_shadow_navs_02(mIntroShakes_navpoints.shadow_nav_2) 
  827.  
  828. 	kill_list_add( mIntroShakes_group.sniper_02.members, OI_ASSET_KILL ) 
  829.  
  830. 	--group_create( mIntroShakes_group.sniper_03.name, true ) 
  831.  
  832. 	--human_use_teleport_navpoints(mIntroShakes_group.sniper_03.members[1], true) 
  833.  
  834. 	--use set navpoints for shadow demon 
  835. 	--mIntroShakes_set_shadow_navs_03(mIntroShakes_navpoints.shadow_nav_3) 
  836.  
  837. 	--kill_list_add( mIntroShakes_group.sniper_03.members, OI_ASSET_KILL ) 
  838. 	 
  839. 	kill_list_wait_for_complete() 
  840.  
  841. 	--WAVE FOUR 
  842. 	--SAM DARK INCITER INTRO 
  843.  
  844. 	group_destroy( mIntroShakes_group.imps_01 ) 
  845.  
  846. 	--group_create( mIntroShakes_group.SAM_Grunt.name, true ) 
  847. 	--group_create( mIntroShakes_group.inciters_01.name, true ) 
  848. 	 
  849. 	-- HVS_JBG - creating and hiding the group 
  850. 	group_create_hidden( mIntroShakes_group.SAM_Grunt.name, true ) 
  851. 	group_create_hidden( mIntroShakes_group.inciters_01.name, true ) 
  852. 	turn_invulnerable( mIntroShakes_group.inciters_01.members[1] ) 
  853. 	 
  854. 	delay(0.01) 
  855. 	-- HVS_JBG - re-hide the group, in some cases the client was sending an un-hide packet back to the host... so we'll delay before re-hiding. 
  856. 	group_hide( mIntroShakes_group.SAM_Grunt.name ) 
  857. 	group_hide( mIntroShakes_group.inciters_01.name ) 
  858. 	turn_invulnerable( mIntroShakes_group.inciters_01.members[1] ) 
  859. 	 
  860. 	-- HVS_BDF: let's see if a brief delay is enough to improve the reliability of Inciter n' Co. 
  861. 	-- being ready on the client for the SAM... 
  862. 	--delay(0.01) 
  863. 	-- HVS_JBG - add a longer delay to ensure the client has had time to create the group 
  864. 	delay(3.0); 
  865. 	--dark_inciter_ultra_shield_disable(mIntroShakes_group.inciters_01.members[1], true) 
  866. 	--audio_object_post_event("Play_DarkInciter_IntroMusic") 
  867.  
  868. 	-- HVS_JBG - make sure the group is shown again before starting the SAM. 
  869. 	group_show( mIntroShakes_group.SAM_Grunt.name ) 
  870. 	group_show( mIntroShakes_group.inciters_01.name ) 
  871. 	 
  872. 	local actor_list = { LOCAL_PLAYER, mIntroShakes_group.SAM_Grunt.sam, mIntroShakes_group.inciters_01.members[1]} 
  873. 	seamless_animated_moment_prep("sam_inciter_intro", actor_list) 
  874. 	on_seamless_animated_moment_end("sam_inciter_intro_complete") 
  875. 	seamless_animated_moment_start("sam_inciter_intro", actor_list) 
  876.  
  877. 	delay(2.0) 
  878. 	--dark_inciter_ultra_shield_disable(mIntroShakes_group.inciters_01.members[1], false) 
  879.  
  880. 	--Wait until the SAM has completed 
  881.     while(mIntroShakes_runtime.inciter_intro_sam_complete == false) do 
  882.          thread_yield() 
  883. 	end 
  884. 	human_gravity_enable(mIntroShakes_group.inciters_01.members[1], true) --HVS_RCK - Make sure he can be petrified and killed that way. 
  885. 	 
  886. 	on_seamless_animated_moment_end("") 
  887.  
  888. 	convo_start( mIntroShakes_convo.shake_challenge ) 
  889.  
  890. 	--mIntroShakes_attack( mIntroShakes_group.bar_demons ) 
  891.  
  892. 	kill_list_add( mIntroShakes_group.inciters_01.members, OI_ASSET_KILL ) 
  893. 	dark_inciter_kill_summons_on_death(mIntroShakes_group.inciters_01.members[1], true) 
  894.  
  895. 	mIntroShakes_attack( mIntroShakes_group.balcony_demons ) 
  896.  
  897. 	kill_list_wait_for_complete() 
  898.  
  899. 	--marker_remove( mIntroShakes_group.sniper_03.members ) 
  900. 	marker_remove( mIntroShakes_group.inciters_01.members ) 
  901. 	marker_remove( mIntroShakes_group.balcony_demons ) 
  902.  
  903. 	objective_text_clear(0) 
  904. 	notoriety_set_min_and_max("police", 0, 0) 
  905. 	notoriety_set("police", 0) 
  906. 	spawning_allow_cop_ambient_spawns(false) 
  907.  
  908. 	convo_start( mIntroShakes_convo.shake_battle_end ) 
  909. 	delay(18) 
  910.  
  911. 	player_controls_disable(LOCAL_PLAYER) 
  912. 	if coop_is_active() then 
  913. 		player_controls_enable(REMOTE_PLAYER) 
  914. 	end 
  915. 	cutscene_play(mIntroShakes_scene.outro, nil, {"host_telenav", "client_telenav"}, true ) 
  916.  
  917. 	character_set_animation_overrides(mIntroShakes_group.shakespeare_npc.npcs[1],"") 
  918. 	clear_animation_state(mIntroShakes_group.shakespeare_npc.npcs[1]) 
  919.  
  920. 	character_collision_enable (mIntroShakes_group.shakespeare_npc.npcs[1], true) 
  921. 	human_gravity_enable(mIntroShakes_group.shakespeare_npc.npcs[1], true) 
  922.  
  923. 	npc_leash_remove( mIntroShakes_group.shakespeare_npc.shakes ) 
  924.  
  925. 	teleport( mIntroShakes_group.shakespeare_npc.shakes, "shakes_nav") 
  926.  
  927.  
  928. 	if cutscene_check_exiting() then 
  929. 		thread_yield()		 
  930. 	end 
  931.  
  932. 	convo_start( mIntroShakes_convo.shake_grant_power ) 
  933. 	 
  934.  
  935. 	delay(6.0) 
  936. 		-- Have player(s) fully power up (non-blocking) 
  937. 	local anim_name = "altars_powerup" 
  938. 	local morph_name = anim_name 
  939. 	local force_play = false 
  940. 	local stand_still = true 
  941. 	local zero_movement = true 
  942. 	effect_play_on_human( mIntroShakes_VFX.power_up.name, LOCAL_PLAYER, "spine2" ) 
  943. 	action_play_non_blocking(LOCAL_PLAYER, anim_name, morph_name, force_play, stand_still, zero_movement, "host_telenav" ) 
  944. 	if coop_is_active() then 
  945. 		effect_play_on_human( mIntroShakes_VFX.power_up.name, REMOTE_PLAYER, "spine2"  ) 
  946. 		action_play_non_blocking(REMOTE_PLAYER, anim_name, morph_name, force_play, stand_still, zero_movement, "client_telenav" ) 
  947. 	end 
  948.  
  949. 	-- Wait for player to react 
  950. 	delay(5) 
  951. 	fade_out(1) 
  952. 	fade_out_block() 
  953. 	force_spawn_contacts() 
  954. 	player_super_power_select( "stomp", SYNC_ALL, "force" ) 
  955.  
  956. 	--WAVE FIVE 
  957. 	--group_create( mIntroShakes_group.bosses.name, true ) 
  958.  
  959. 	--kill_list_add( mIntroShakes_group.bosses.members, OI_ASSET_KILL_FULL ) 
  960.  
  961. 	--kill_list_wait_for_complete() 
  962.  
  963. end 
  964.  
  965. -- Do any cleanup for this checkpoint. 
  966. -- 
  967. -- (+++THIS IS CALLED FROM MISSION CLEANUP, MUST RETURN IMMEDIATELY+++) 
  968. -- 
  969. -- mission_exit: (bool) Whether we're exiting the mission entirely, or just 
  970. --					moving on to the next checkpoint. 
  971. -- 
  972. function mIntroShakes_sdb_cleanup(mission_exit) 
  973.  
  974. 	if mission_exit then 
  975. 		spawning_allow_cop_ambient_spawns(true) 
  976. 		roadblocks_enable(true)	 
  977. 		spawning_vehicles(true) 	 
  978. 	end 
  979.  
  980. end 
  981.  
  982. ------------------------------------ 
  983. -- 
  984. -- Checkpoint helper functions 
  985. -- 
  986. ------------------------------------ 
  987. function mIntroShakes_set_shadow_navs(nav_group) 
  988. 	human_clear_teleport_navpoints(mIntroShakes_group.sniper_01.members[1]) 
  989. 	 
  990. 	for i, nav in pairs(nav_group) do 
  991. 		human_add_teleport_navpoint(mIntroShakes_group.sniper_01.members[1], nav) 
  992. 	end 
  993. end 
  994.  
  995. function mIntroShakes_set_shadow_navs_02(nav_group) 
  996. 	human_clear_teleport_navpoints(mIntroShakes_group.sniper_02.members[1]) 
  997. 	 
  998. 	for i, nav in pairs(nav_group) do 
  999. 		human_add_teleport_navpoint(mIntroShakes_group.sniper_02.members[1], nav) 
  1000. 	end 
  1001. end 
  1002.  
  1003. function mIntroShakes_set_shadow_navs_03(nav_group) 
  1004. 	human_clear_teleport_navpoints(mIntroShakes_group.sniper_03.members[1]) 
  1005. 	 
  1006. 	for i, nav in pairs(nav_group) do 
  1007. 		human_add_teleport_navpoint(mIntroShakes_group.sniper_03.members[1], nav) 
  1008. 	end 
  1009. end 
  1010. ------------------------------------ 
  1011. -- 
  1012. -- Checkpoint callback functions 
  1013. -- 
  1014. ------------------------------------ 
  1015. function SAM_shkspr_intro_complete() 
  1016. 	mIntroShakes_runtime.shakespeare_sam_complete = true 
  1017. end 
  1018.  
  1019. function sam_inciter_intro_complete() 
  1020. 	mIntroShakes_runtime.inciter_intro_sam_complete = true 
  1021. 	 
  1022. 	turn_vulnerable( mIntroShakes_group.inciters_01.members[1] ) 
  1023. end 
  1024.  
  1025. ------------------------------------ 
  1026. -- 
  1027. -- Checkpoint thread functions 
  1028. -- 
  1029. ------------------------------------ 
  1030.  
  1031. -------------------------------------------------------------------------------------------------- 
  1032. --[[ 
  1033.  
  1034.    _____                                        ______                _   _                  
  1035.   / ____|                                      |  ____|              | | (_)                 
  1036.  | |     ___  _ __ ___  _ __ ___   ___  _ __   | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  1037.  | |    / _ \| '_ ` _ \| '_ ` _ \ / _ \| '_ \  |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  1038.  | |___| (_) | | | | | | | | | | | (_) | | | | | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  1039.   \_____\___/|_| |_| |_|_| |_| |_|\___/|_| |_| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  1040. 																							 
  1041. 																							 
  1042. ]]-- 
  1043.  
  1044. --Reinforcement spawn 
  1045. function mIntroShakes_attack(group) 
  1046. 	local block = true 
  1047. 	local should_run = true 
  1048. 	local should_fire = false 
  1049. 	group_create( group.name, true, block ) 
  1050. 	for index, npc in pairs( group.members ) do 
  1051. 		ai_do_scripted_move( npc, group.destination, should_run, should_fire ) 
  1052. 	end 
  1053. 	kill_list_add( group.members, OI_ASSET_KILL) 
  1054. end 
  1055.  
  1056. --Thread Killer 
  1057. function mIntroShakes_safe_thread_kill( thread ) 
  1058. 	 
  1059. 	if( thread ~= nil )	then 
  1060. 		if( thread ~= INVALID_THREAD_HANDLE) then 
  1061. 			thread_kill( thread ) 
  1062. 			thread = INVALID_THREAD_HANDLE 
  1063. 		end 
  1064. 	end 
  1065.  
  1066. end 
  1067.  
  1068. -------------------------------------------------------------------------------------------------- 
  1069. --[[ 
  1070.  
  1071.    _____      _ _ _                _      ______                _   _                  
  1072.   / ____|    | | | |              | |    |  ____|              | | (_)                 
  1073.  | |     __ _| | | |__   __ _  ___| | __ | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  1074.  | |    / _` | | | '_ \ / _` |/ __| |/ / |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  1075.  | |___| (_| | | | |_) | (_| | (__|   <  | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  1076.   \_____\__,_|_|_|_.__/ \__,_|\___|_|\_\ |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  1077. 																					   
  1078. 																					   
  1079. ]]-- 
  1080.  
  1081. -------------------------------------------------------------------------------------------------- 
  1082. --[[ 
  1083.  
  1084.   _______ _                        _   ______                _   _                  
  1085.  |__   __| |                      | | |  ____|              | | (_)                 
  1086. 	| |  | |__  _ __ ___  __ _  __| | | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  1087. 	| |  | '_ \| '__/ _ \/ _` |/ _` | |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  1088. 	| |  | | | | | |  __/ (_| | (_| | | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  1089. 	|_|  |_| |_|_|  \___|\__,_|\__,_| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  1090. 																				    
  1091. 																				    
  1092. ]]-- 
  1093.  
  1094.