./mintrovlad.lua

  1.  
  2. --[[ 
  3. 	mIntroVlad.lua 
  4. 	SRG Map Event Script 
  5. 	DATE: 2014-05-09 
  6. 	AUTHOR:	Jim Butts 
  7. ]]-- 
  8.  
  9. -- Tweakable Parameters -- 
  10. local SUPERPOWER_AURA = 2 
  11.  
  12.  
  13. -------------------------------------------------------------------------------------------------- 
  14. --[[ 
  15.  
  16.    _____                            
  17.   / ____|                           
  18.  | |  __ _ __ ___  _   _ _ __  ___  
  19.  | | |_ | '__/ _ \| | | | '_ \/ __| 
  20.  | |__| | | | (_) | |_| | |_) \__ \ 
  21.   \_____|_|  \___/ \__,_| .__/|___/ 
  22. 						| |         
  23. 						|_|         
  24.  
  25. ]]-- 
  26. -------------------------------------------------------------------------------------------------- 
  27. 	mIntroVlad_group =  
  28. 	{ 
  29. 		vlad_group = 
  30. 		{ 
  31. 			name = "vlad_group", 
  32. 			members = 
  33. 			{ 
  34. 				"Vlad", 
  35. 			}, 
  36. 			vlad_npc = "Vlad", 
  37. 		--"prison" is anim tag vlad_prsn_st.animx 
  38. 		}, 
  39. 		SAM_Vlads_Intro = { 
  40. 			name = "SAM_Vlads_Intro", 
  41. 		}, 
  42. 		care_animals_group = 
  43. 		{ 
  44. 			name = "care_devils", 
  45. 			members = 
  46. 			{ 
  47. 				"care_devil<001>", 
  48. 				"care_devil<002>", 
  49. 				"care_devil<003>", 
  50. 				"care_devil<004>", 
  51. 				"care_devil<005>", 
  52. 				"care_devil<006>", 
  53. 				"care_devil<007>", 
  54. 				"care_devil<008>", 
  55. 				"care_devil<009>", 
  56. 				"care_devil<010>", 
  57. 			}, 
  58. 			care_devil_1 = "care_devil<001>", 
  59. 			care_devil_2 = "care_devil<002>", 
  60. 		}, 
  61.  
  62. 		peds =  
  63. 		{ 
  64. 			name = "peds_group", 
  65. 			members = 
  66. 			{ 
  67. 				"Ped<001>", 
  68. 				"Ped<002>", 
  69. 				"Ped<003>", 
  70. 				"Ped<004>", 
  71. 				"Ped<005>", 
  72. 				"Ped<006>", 
  73. 				"Ped<007>",  
  74. 				"Ped<008>",  
  75. 				"Ped<009>",  
  76. 				"Ped<010>",  
  77. 			--	"Ped<011>",  
  78. 			--	"Ped<011>",  
  79. 			}, 
  80. 			 
  81. 			ped_1 = "Ped<001>", 
  82. 			ped_2 = "Ped<002>", 
  83. 			ped_3 = "Ped<003>", 
  84. 			ped_4 = "Ped<004>", 
  85. 			ped_5 = "Ped<005>", 
  86. 			ped_6 = "Ped<006>", 
  87. 			ped_7 = "Ped<007>", 
  88. 			ped_8 = "Ped<008>", 
  89. 			ped_9 = "Ped<009>", 
  90. 			ped_10 = "Ped<010>", 
  91. 			--ped_11 = "Ped<011>", 
  92. 			--ped_12 = "Ped<012>", 
  93.  
  94. 			-- ped animations 
  95. 			roundup_a_anim = { "roundup"}, 
  96. 			roundup_b_anim = { "roundup b"}, 
  97. 			roundup_c_anim = { "roundup c"}, 
  98. 			cower_a = { "cower stand variant 1"}, 
  99. 			cower_b = { "cower stand variant 2"}, 
  100. 			cower_c = { "cower stand variant 3"}, 
  101. 			cower_d = { "cower stand variant 4"}, 
  102. 			impaled_a = { "impaled_a"}, 
  103. 			impaled_b = { "impaled_b"}, 
  104. 			impaled_c = { "impaled_c"}, 
  105. 			 
  106. 			-- unique ped anims need to be preloaded 
  107. 			fetal = {"fetal cry"}, --life_fetalcry.animx 
  108. 		}, 
  109. 		guards_group = 
  110. 		{ 
  111. 			name = "guards", 
  112. 			members = 
  113. 			{ 
  114. 				"demon_guard<001>", 
  115. 				"demon_guard<002>", 
  116. 				"demon_guard<003>", 
  117. 				"demon_guard<004>", 
  118. 				"demon_guard<005>", 
  119. 				"demon_guard<006>", 
  120. 				"head_guard<001>", 
  121. 				"head_guard<002>",  
  122. 				"head_guard<003>", 
  123. 				"demon_dj<001>", 
  124. 			}, 
  125. 			dj_1 = "demon_dj<001>", 
  126. 			head_guard = "head_guard<001>", 
  127. 		}, 
  128.  
  129. 		winged_group =  
  130. 		{ 
  131. 			name = "winged_group", 
  132. 			members = {"winged_guard<001>", "winged_guard<002>", "winged_guard<003>", "winged_guard<004>" }, 
  133. 		}, 
  134.  
  135. 		shadow_group =  
  136. 		{ 
  137. 			name = "shadow_group", 
  138. 			members = { "shadow_demon<001>", "shadow_demon<002>" }, 
  139. 		}, 
  140. 	} 
  141.  
  142. -------------------------------------------------------------------------------------------------- 
  143. --[[ 
  144.  
  145.   _   _                         _       _        
  146.  | \ | |                       (_)     | |       
  147.  |  \| | __ ___   ___ __   ___  _ _ __ | |_ ___  
  148.  | . ` |/ _` \ \ / / '_ \ / _ \| | '_ \| __/ __| 
  149.  | |\  | (_| |\ V /| |_) | (_) | | | | | |_\__ \ 
  150.  |_| \_|\__,_| \_/ | .__/ \___/|_|_| |_|\__|___/ 
  151. 				   | |                           
  152. 				   |_|                           
  153.  
  154. ]]-- 
  155. --------------------------------------------------------------------------------------------------	 
  156.  
  157. 	mIntroVlad_navpoints =  
  158. 	{ 
  159. 		player_1_teleport_nav = "tele_host", 
  160. 		player_2_teleport_nav = "tele_client", 
  161. 		vlad_teleport_nav = "tele_vlad", 
  162. 	} 
  163. 	 
  164. 	mIntroVlad_shadow_demon_navpoints =  
  165. 	{ 
  166. 		navs = { "teleport_nav<001>", "teleport_nav<002>", "teleport_nav<003>", "teleport_nav<004>", "teleport_nav<005>", "teleport_nav<006>",  
  167. 				 "teleport_nav<007>", "teleport_nav<008>", "teleport_nav<009>", "teleport_nav<010>", "teleport_nav<011>", "teleport_nav<012>" },	 
  168. 	} 
  169. -------------------------------------------------------------------------------------------------- 
  170. --[[ 
  171.  
  172.   _______ _                        _      
  173.  |__   __| |                      | |     
  174. 	| |  | |__  _ __ ___  __ _  __| |___  
  175. 	| |  | '_ \| '__/ _ \/ _` |/ _` / __| 
  176. 	| |  | | | | | |  __/ (_| | (_| \__ \ 
  177. 	|_|  |_| |_|_|  \___|\__,_|\__,_|___/ 
  178. 										  
  179. 										  
  180. ]]-- 
  181. -------------------------------------------------------------------------------------------------- 
  182. 	mIntroVlad_thread =  
  183. 	{ 
  184.  
  185. 	} 
  186.  
  187. -------------------------------------------------------------------------------------------------- 
  188. --[[ 
  189. 				 _             _   _           _        _____        _         
  190. 	 /\         (_)           | \ | |         | |      |  __ \      | |        
  191. 	/  \   _ __  _ _ __ ___   |  \| | ___   __| | ___  | |  | | __ _| |_ __ _  
  192.    / /\ \ | '_ \| | '_ ` _ \  | . ` |/ _ \ / _` |/ _ \ | |  | |/ _` | __/ _` | 
  193.   / ____ \| | | | | | | | | | | |\  | (_) | (_| |  __/ | |__| | (_| | || (_| | 
  194.  /_/    \_\_| |_|_|_| |_| |_| |_| \_|\___/ \__,_|\___| |_____/ \__,_|\__\__,_| 
  195. 																			   
  196. ]]-- 
  197. --------------------------------------------------------------------------------------------------      
  198.  
  199. 	mIntroVlad_anim_node =  
  200. 	{ 
  201.  
  202. 	}	                                                                   
  203.  
  204. -------------------------------------------------------------------------------------------------- 
  205. --[[ 
  206.  
  207.    _____ _               _                _       _        
  208.   / ____| |             | |              (_)     | |       
  209.  | |    | |__   ___  ___| | ___ __   ___  _ _ __ | |_ ___  
  210.  | |    | '_ \ / _ \/ __| |/ / '_ \ / _ \| | '_ \| __/ __| 
  211.  | |____| | | |  __/ (__|   <| |_) | (_) | | | | | |_\__ \ 
  212.   \_____|_| |_|\___|\___|_|\_\ .__/ \___/|_|_| |_|\__|___/ 
  213. 							 | |                           
  214. 							 |_|                           
  215.  
  216. ]]-- 
  217. -------------------------------------------------------------------------------------------------- 
  218. 	mIntroVlad_checkpoint =  
  219. 	{ 
  220. 		--[[ CP1 MISSION START ]]-- 
  221. 		{ 
  222. 			name = MISSION_START_CHECKPOINT, 
  223. 			init = "mIntroVlad_prison_init", 
  224. 			run = "mIntroVlad_prison_run", 
  225. 			cleanup = "mIntroVlad_prison_cleanup", 
  226. 			next_checkpoint = "Post_Sam_Checkpoint", 
  227. 			host_start = mIntroVlad_navpoints.player_1_teleport_nav, 
  228. 			client_start = mIntroVlad_navpoints.player_2_teleport_nav, 
  229. 			p1_car_nav = "", 
  230. 			p2_car_nav = "", 
  231. 			start_groups = { mIntroVlad_group.tank_01 }, 
  232. 			cp_only_groups = {}, 
  233. 		}, 
  234. 		 
  235. 		--CP2 
  236. 		{ 
  237. 			name = "Post_Sam_Checkpoint", 
  238. 			init = "mIntroVlad_cp2_init", 
  239. 			run = "mIntroVlad_cp2_run", 
  240. 			cleanup = "mIntroVlad_cp2_cleanup", 
  241. 			next_checkpoint = "nil", 
  242. 			host_start = mIntroVlad_navpoints.player_1_teleport_nav, 
  243. 			client_start = mIntroVlad_navpoints.player_2_teleport_nav, 
  244. 			p1_car_nav = "", 
  245. 			p2_car_nav = "", 
  246. 			start_groups = { mIntroVlad_group.tank_01 }, 
  247. 			cp_only_groups = {}, 
  248. 		}, 
  249. 	} 
  250. 	 
  251. -------------------------------------------------------------------------------------------------- 
  252. --[[ 
  253.  
  254.    _____      _                                 
  255.   / ____|    | |                                
  256.  | |    _   _| |_ ___  ___ ___ _ __   ___  ___  
  257.  | |   | | | | __/ __|/ __/ _ \ '_ \ / _ \/ __| 
  258.  | |___| |_| | |_\__ \ (_|  __/ | | |  __/\__ \ 
  259.   \_____\__,_|\__|___/\___\___|_| |_|\___||___/ 
  260. 											    
  261. 											    
  262. ]]-- 
  263. -------------------------------------------------------------------------------------------------- 
  264. 	mIntroVlad_scene =  
  265. 	{ 
  266. 		intro = "", 
  267. 		outro = "Bink_Vlad_Rescued" 
  268. 	} 
  269.  
  270. -------------------------------------------------------------------------------------------------- 
  271. --[[ 
  272.  
  273.    _____                                    _   _                  
  274.   / ____|                                  | | (_)                 
  275.  | |     ___  _ ____   _____ _ __ ___  __ _| |_ _  ___  _ __  ___  
  276.  | |    / _ \| '_ \ \ / / _ \ '__/ __|/ _` | __| |/ _ \| '_ \/ __| 
  277.  | |___| (_) | | | \ V /  __/ |  \__ \ (_| | |_| | (_) | | | \__ \ 
  278.   \_____\___/|_| |_|\_/ \___|_|  |___/\__,_|\__|_|\___/|_| |_|___/ 
  279. 																   
  280. 																   
  281. ]]-- 
  282. -------------------------------------------------------------------------------------------------- 
  283.  
  284. 	mIntroVlad_persona = {  
  285. 		Johnny = { 
  286. 			persona_name = "Johnny_Gat", 
  287. 			persona_id = INVALID_PERSONA_HANDLE 
  288. 		}, 
  289. 		Kinzie = { 
  290. 			persona_name = "Kinzie", 
  291. 			persona_id = INVALID_PERSONA_HANDLE 
  292. 		}, 
  293. 		Vlad = { 
  294. 			persona_name = "Vlad", 
  295. 			persona_id = INVALID_PERSONA_HANDLE 
  296. 		}, 
  297.  
  298. 	} 
  299.  
  300. 	mIntroVlad_convo =  
  301. 	{ 
  302. 		--[[ = { 
  303. 			name = "file_name without voice (_bm, _wm, _bf...", 
  304. 			player_talks = true or false, 
  305. 			handle = INVALID_CONVERSATION_HANDLE, 
  306. 			convo_thread = INVALID_THREAD_HANDLE, 
  307. 			max_wait_seconds = 60,	-- if the conversation doesn't complete before this time, kill it 
  308. 			timer_thread = INVALID_THREAD_HANDLE, 
  309. 			priority = CONVO_PRIORITY_HIGH or CONVO_PRIORITY_NORMAL or CONVO_PRIORITY_OPTIONAL 
  310. 			(optional) persona_line = true,	-- this is a single line 
  311. 			(required if persona_line) speaker_name = "name of speaker",	-- single line speaker (might be set before call to play is made?) 
  312. 			(optional)phone_call = true,  -- this is a phone conversation (phone persona must be preloaded) 
  313. 			(required if phone_call) receiving_call = true or false  -- auto-answer is always true in missions (until proven otherwise) 
  314. 			 
  315. 		},]] 
  316. 		Gat_Convo_A = { 
  317. 			name = "mIntroVlad_con_gat_a", 
  318. 			player_talks = false, 
  319. 			handle = INVALID_CONVERSATION_HANDLE, 
  320. 			convo_thread = INVALID_THREAD_HANDLE, 
  321. 			max_wait_seconds = 60, 
  322. 			timer_thread = INVALID_THREAD_HANDLE, 
  323. 			priority = CONVO_PRIORITY_NORMAL, 
  324. 		},			 
  325.  
  326. 		Kinzie_Convo_A = { 
  327. 			name = "mIntroVlad_con_kinzie_a",  
  328. 			player_talks = false, 
  329. 			handle = INVALID_CONVERSATION_HANDLE, 
  330. 			convo_thread = INVALID_THREAD_HANDLE, 
  331. 			max_wait_seconds = 60, 
  332. 			timer_thread = INVALID_THREAD_HANDLE, 
  333. 			priority = CONVO_PRIORITY_NORMAL, 
  334. 		},    
  335.  
  336. 		destroy_music = { 
  337. 			name = "mission_intro_vlad_music", 
  338. 			player_talks = false, 
  339. 			handle = INVALID_CONVERSATION_HANDLE, 
  340. 			convo_thread = INVALID_THREAD_HANDLE, 
  341. 			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
  342. 			timer_thread = INVALID_THREAD_HANDLE, 
  343. 			priority = CONVO_PRIORITY_NORMAL, 
  344. 			persona_line = true, 
  345. 			speaker_name = mIntroVlad_group.vlad_group.vlad_npc, 
  346. 		},	 
  347.  
  348. 		vlad_end = { 
  349. 			name = "mission_intro_vlad_end", 
  350. 			player_talks = false, 
  351. 			handle = INVALID_CONVERSATION_HANDLE, 
  352. 			convo_thread = INVALID_THREAD_HANDLE, 
  353. 			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
  354. 			timer_thread = INVALID_THREAD_HANDLE, 
  355. 			priority = CONVO_PRIORITY_NORMAL, 
  356. 			persona_line = true, 
  357. 			speaker_name = mIntroVlad_group.vlad_group.vlad_npc, 
  358. 		},	 
  359.  
  360. 		grant_aura = { 
  361. 			name = "grant_power_-_aura", 
  362. 			player_talks = false, 
  363. 			handle = INVALID_CONVERSATION_HANDLE, 
  364. 			convo_thread = INVALID_THREAD_HANDLE, 
  365. 			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
  366. 			timer_thread = INVALID_THREAD_HANDLE, 
  367. 			priority = CONVO_PRIORITY_NORMAL, 
  368. 			persona_line = true, 
  369. 			speaker_name = mIntroVlad_group.vlad_group.vlad_npc, 
  370. 		},	 
  371.  
  372. 	} 
  373. 	 
  374. 	mIntroVlad_convo_queue =  
  375. 	{ 
  376. 		--[[start_drive_queue = {  
  377. 			{ delay = 2.0, convo = mIntroVlad_convo.goto_first_checkpoint_nav }, 
  378. 			{ delay = 4.0, convo = mIntroVlad_convo.goto_first_checkpoint_nav2 }, 
  379. 			{ delay = 3.0, convo = mIntroVlad_convo.goto_first_checkpoint_nav3 }, 
  380. 			{ delay = 5.0, convo = mIntroVlad_convo.goto_first_checkpoint_nav4 } 
  381. 		}, 
  382. 		]]-- 
  383. 	} 
  384. 	 
  385. -------------------------------------------------------------------------------------------------- 
  386. --[[ 
  387.  
  388.   _______   _                            
  389.  |__   __| (_)                           
  390. 	| |_ __ _  __ _  __ _  ___ _ __ ___  
  391. 	| | '__| |/ _` |/ _` |/ _ \ '__/ __| 
  392. 	| | |  | | (_| | (_| |  __/ |  \__ \ 
  393. 	|_|_|  |_|\__, |\__, |\___|_|  |___/ 
  394. 			   __/ | __/ |               
  395. 			  |___/ |___/                
  396.  
  397. ]]-- 
  398. -------------------------------------------------------------------------------------------------- 
  399. 	mIntroVlad_trigger =  
  400. 	{ 
  401. 		-- = { 
  402. 		--	name = "_trigger", 
  403. 		--	hit = false, 
  404. 		-- 	last_hit_by = nil, -- 	last_hit_human = nil (set to the last human to enter the trigger in the default trigger callback) 
  405. 		--  (optional)callback = "mIntroVlad_function_name_cb" 
  406. 		--	(optional)marker = TRIGGER_LOCATION or TRIGGER_USE or custom or don't include for no marker 
  407. 		--  (optional)waypoint = true, 
  408. 		--  (optional)teleport_to = { 
  409. 		--						host = "host_nav", 
  410. 		--						client = "client_nav"  
  411. 		--					},		 
  412. 		--	(optional)conversation = mIntroVlad_convo.convo_name  -- play a conversation 
  413. 		--	(optional)next_trigger = "next_trigger_name" sets up next trigger when triggered (breadcrumbs) 
  414. 		--}, 
  415. 	Music_Trigger = 
  416. 	{ 
  417. 		name = "Music_Trigger<001>", 
  418. 		hit = false, 
  419. 		marker = TRIGGER_USE, 
  420. 	}, 
  421.  
  422. 	} 
  423.  
  424. -------------------------------------------------------------------------------------------------- 
  425. 																	  --[[ INTERROGATION DATA ]]-- 
  426. -------------------------------------------------------------------------------------------------- 
  427. 	--mIntroVlad_interrogate = { 
  428. 	--	leader = { 
  429. 	--		target = mIntroVlad_group.friendly_fire.owner, 
  430. 	--		persona = "Interrogation", 
  431. 	--		objective = "mIntroVlad_INTERROGATE_OWNER", 
  432. 	--	--	(optional)conversation = mIntroVlad_convo.convo_name  -- play a conversation while interrogating 
  433. 	--	}, 
  434. 	--} 
  435. 		 
  436. -------------------------------------------------------------------------------------------------- 
  437. --[[ 
  438.  
  439.    ____  _   _                
  440.   / __ \| | | |               
  441.  | |  | | |_| |__   ___ _ __  
  442.  | |  | | __| '_ \ / _ \ '__| 
  443.  | |__| | |_| | | |  __/ |    
  444.   \____/ \__|_| |_|\___|_|    
  445. 							  
  446. 							  
  447. ]]-- 
  448. -------------------------------------------------------------------------------------------------- 
  449.  
  450. mVladIntro_movers = { 
  451.  
  452. 	hall_door = { 
  453. 		mover = "Door_Mover<001>", 
  454. 	}, 
  455. } 
  456. 	mIntroVlad_homie =  
  457. 	{ 
  458. 			vlad = "Vlad", 
  459. 	} 
  460. 	 
  461. 	mIntroVlad_tweakables =  
  462. 	{ 
  463.  
  464. 	} 
  465. 	mIntroVlad_runtime =  
  466. 	{ 
  467. 		bDoorOpened = false, 
  468. 		bIntroCinemaDone = false, 
  469. 		SAMPLAYEDONCE = true, 
  470. 	} 
  471. 	mIntroVladVFX = 
  472. 	{ 
  473.  
  474. 		power_up = { name = "vfx_Altars_PowerUp", handle = "" }, 
  475. 		teleport = { name = "Vfx_Hell_Teleport", handle = "" }, 
  476. 	} 
  477. -------------------------------------------------------------------------------------------------- 
  478. --[[ 
  479.  
  480.    _____ _                  _               _   ______                _   _                  
  481.   / ____| |                | |             | | |  ____|              | | (_)                 
  482.  | (___ | |_ __ _ _ __   __| | __ _ _ __ __| | | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  483.   \___ \| __/ _` | '_ \ / _` |/ _` | '__/ _` | |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  484.   ____) | || (_| | | | | (_| | (_| | | | (_| | | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  485.  |_____/ \__\__,_|_| |_|\__,_|\__,_|_|  \__,_| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  486. 																							 
  487. 																							 
  488. ]]-- 
  489.  
  490. -- This is the primary entry point for the mission, and is responsible for starting up the mission 
  491. -- at the specified checkpoint. 
  492. -- CALLED FROM CODE 
  493. -- 
  494. -- start_checkpoint_name:	(string) The checkpoint the mission should begin at 
  495. -- is_restart:					(bool) TRUE if the mission is restarting, FALSE otherwise 
  496. -- 
  497. function mIntroVlad_start(start_checkpoint_name, is_restart) 
  498. 	-- disable the map 
  499. 	cell_menu_disable_map(true) 
  500.  
  501. 	mission_start_fade_out(0.0) 
  502. 	city_zone_swap("m_prison", true) 
  503. 	set_ped_override_density(.1) 
  504. 	set_traffic_density(.1) 
  505. 	parking_spot_disable_all(true) 
  506. 	-- set limiters  
  507. 	 tweak_table_override_value("Jump_super_max_height_scripted",26) 
  508. 	 tweak_table_override_value("Sprint_super_max_speed_scripted",28) 
  509.  
  510.  
  511. 		-- initialize systems 
  512. 	mission_startup(mIntroVlad_trigger, mIntroVlad_convo) 
  513. 	 
  514. 	-- HVS_BDF: we don't necessarily want to call load_persona() because this creates a 2D 
  515. 	-- version, which can prevent actual in-game characters from lip syncing their VO if 
  516. 	-- the 2D persona was loaded prior to their character being spawned. 
  517. 	-- In the case of PC characters, they are present in the world  
  518. 	-- and their characters should lip sync their VO.  Same with Vlad. 
  519. 	--load_persona(mIntro_persona.Johnny) 
  520. 	--load_persona(mIntro_persona.Kinzie) 
  521. 	--load_persona(mIntroVlad_persona.Vlad) 
  522.  
  523. 	-- if using interrogations 
  524. 	--interrogate_startup(mIntroVlad_interrogate) 
  525. 	 
  526. 	local start_cp = get_table_by_name(mIntroVlad_checkpoint, MISSION_START_CHECKPOINT) 
  527.  
  528. 	-- TEMPORARY: give player approximate loadout of weapons & superpowers 
  529. 	-- TODO: remove this before the game ships!!! 
  530. 	--hvUnlockLoadout("mIntroVlad") 
  531.  
  532. 	teleport_coop(start_cp.host_start, start_cp.client_start, true) 
  533.  
  534.  
  535. 	-- Check if this mission starting from the beginning 
  536. 	if (start_checkpoint_name == start_cp.name) then 
  537. 		if (is_restart == false and mIntroVlad_scene.intro ~= "") then 
  538. 			local fade_in_after = false 
  539. 			--cutscene_play(mIntroVlad_scene.intro, nil, {start_cp.host_start, start_cp.client_start}, fade_in_after) 
  540. 		else 
  541.  
  542. 		end 
  543. 		fade_out(0) 
  544. 	end 
  545.  
  546. 		-- Handle mission initialization for the current checkpoint 
  547. 		mIntroVlad_initialize(start_checkpoint_name) 
  548.  
  549. 		-- Run the mission from the current checkpoint 
  550. 		checkpoint_run_mission(mIntroVlad_checkpoint, start_checkpoint_name) 
  551.  
  552. 		-- end cutscene 
  553. 		mission_end_success("mIntroVlad", nil) 
  554.  
  555. end 
  556.  
  557. -- This is the primary function responsible for cleaning up the entire mission 
  558. -- CALLED FROM CODE (+++MUST RETURN IMMEDIATELY+++) 
  559. -- 
  560. function mIntroVlad_cleanup() 
  561. 	--[[ INSERT ANY MISSION SPECIFIC CLEAN-UP ]]-- 
  562. 	player_controls_enable(LOCAL_PLAYER) 
  563. 	if coop_is_active() then 
  564. 		player_controls_enable(REMOTE_PLAYER) 
  565. 	end 
  566. 	tweak_table_restore_value ("Jump_super_max_height_scripted") 
  567. 	tweak_table_restore_value ("Sprint_super_max_speed_scripted") 
  568.  
  569. 	-- restore map 
  570. 	cell_menu_disable_map(false) 
  571. 	set_ped_override_density(-1) 
  572. 	set_traffic_density(1) 
  573. 	parking_spot_disable_all(false) 
  574. 		-- cleanup function 
  575. 	on_door_opened("", mVladIntro_movers.hall_door.mover) 
  576. 	CleanupTriggers() 
  577. 	on_death ( "", mIntroVlad_homie.vlad ) 
  578. 	on_dismiss ( "", mIntroVlad_homie.vlad ) 
  579. 	on_seamless_animated_moment_end("") 
  580. 	seamless_animated_moment_cleanup() 
  581. 	on_take_damage("", "demon_dj<001>") 
  582. 	--return normal player jump/sprint values 
  583. 	notoriety_set_min_and_max( "luchadores", 0, MAX_NOTORIETY_LEVEL ) 
  584. 	notoriety_set_min_and_max( "police", 0, MAX_NOTORIETY_LEVEL ) 
  585. 		mIntroVlad_cleanup_homies() 
  586.  
  587. 		 
  588. 		player_super_attacks_enable( true )	 
  589. 	--make sure zone is off 
  590. 	city_zone_swap("m_prison", false) 
  591. 	-- teleport player 
  592.  
  593.  
  594. 	-- cleanup all threads 
  595. 	cleanup_threads(mIntroVlad_thread) 
  596. 	 
  597. 	-- run checkpoint cleanups (move into mission_shutdown?) 
  598. 	checkpoint_cleanup_mission(mIntroVlad_checkpoint) 
  599. 	 
  600. 	-- cleanup triggers, convos, kill_list and interrogations 
  601. 	mission_shutdown() 
  602. 	 
  603. 	-- cleanup all groups 
  604. 	cleanup_groups(mIntroVlad_group) 
  605.  
  606.  
  607. 		spawning_allow_cop_ambient_spawns(true) 
  608.  
  609. 	if not mission_is_failed() then 
  610. 		--teleport_coop(mIntroVlad_navpoints.player_1_teleport_nav, mIntroVlad_navpoints.player_2_teleport_nav, true) 
  611. 		player_unlock_super_power( SUPERPOWER_AURA, LOCAL_PLAYER, true ) 
  612. 		if coop_is_active() then 
  613. 			player_unlock_super_power( SUPERPOWER_AURA, REMOTE_PLAYER, true ) 
  614. 		end 	 
  615. 	end 
  616.  
  617. end 
  618.  
  619. -- Called when the mission has ended with success 
  620. -- CALLED FROM CODE (+++MUST RETURN IMMEDIATELY+++) 
  621. -- 
  622. function mIntroVlad_success() 
  623. 	--[[ INSERT ANY MISSION SPECIFIC SUCCESS STUFF ]]-- 
  624. 	-- Equip the superpower if we finished successfully 
  625. 	player_super_power_select( "aura", SYNC_ALL, "aura_coldfire" )	 
  626. end 
  627.  
  628. -------------------------------------------------------------------------------------------------- 
  629. --[[ 
  630.  
  631.  
  632.   _____       _ _   _       _ _           ______                _   _                  
  633.  |_   _|     (_) | (_)     | (_)         |  ____|              | | (_)                 
  634.    | |  _ __  _| |_ _  __ _| |_ _______  | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  635.    | | | '_ \| | __| |/ _` | | |_  / _ \ |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  636.   _| |_| | | | | |_| | (_| | | |/ /  __/ | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  637.  |_____|_| |_|_|\__|_|\__,_|_|_/___\___| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  638. 																					   
  639. 																					   
  640. ]]-- 
  641.  
  642. -- Initialize the mission for the specified checkpoint 
  643. -- 
  644. -- checkpoint_name:		(string) Checkpoint to initialize the mission to 
  645. -- 
  646. function mIntroVlad_initialize(checkpoint_name) 
  647. 	-- Common initialization 
  648. 	mIntroVlad_initialize_common() 
  649.  
  650. 	 
  651. 	-- Checkpoint specific initialization 
  652. 	checkpoint_init(mIntroVlad_checkpoint, checkpoint_name) 
  653.  
  654. 	-- Remove any present subtitles 
  655. 	message_remove_all() 
  656.  
  657. 	-- Start fading in  
  658. 	mission_start_fade_in() 
  659. end 
  660.  
  661. -- Handle any common initialization 
  662. -- 
  663. function mIntroVlad_initialize_common() 
  664. 	--[[ INSERT ANY COMMON INITIALIZATION CODE HERE ]]-- 
  665. 	notoriety_set_min_and_max( "luchadores", 0, 0 ) 
  666. 	notoriety_set_min_and_max( "police", 0, 0 ) 
  667.  
  668. 	--HVS_RCK[KING]7/7/14 - Can't do teleports during cleanup 
  669. 	mission_set_cancel_warp_location("prison_nav_tele<001>", "prison_nav_tele<002>") 
  670. end 
  671.  
  672. -------------------------------------------------------------------------------------------------- 
  673. --[[ 
  674.  
  675.  
  676.    _____ _               _                _       _     ______                _   _                  
  677.   / ____| |             | |              (_)     | |   |  ____|              | | (_)                 
  678.  | |    | |__   ___  ___| | ___ __   ___  _ _ __ | |_  | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  679.  | |    | '_ \ / _ \/ __| |/ / '_ \ / _ \| | '_ \| __| |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  680.  | |____| | | |  __/ (__|   <| |_) | (_) | | | | | |_  | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  681.   \_____|_| |_|\___|\___|_|\_\ .__/ \___/|_|_| |_|\__| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  682. 							 | |                                                                     
  683. 							 |_|                                                                     
  684.  
  685. ]]-- 
  686.  
  687. -- Initialize this checkpoint. 
  688. -- 
  689. -- mission_start: (bool) Whether we're initializing from a mission (re)start or from 
  690. --					a natural play-through. 
  691. -- 
  692. function mIntroVlad_prison_init(mission_start) 
  693. 		teleport_coop("player_start_host", "player_start_client", true)	 
  694.  
  695. end 
  696. 								 
  697. -- The next objective 
  698. -- 
  699. function mIntroVlad_prison_run() 
  700. 	 
  701. 	objective_text_clear(0) 
  702. --	message( "Johnny: If this guy is in a prison in HELL you know he must be the kind of guy I like", 5, false ) 
  703. 	group_create(mIntroVlad_group.peds, true) 
  704.  
  705. 	delay(.1) 
  706. 	set_animation_state(mIntroVlad_group.peds.ped_1, "fetal cry") 
  707. 	set_animation_state(mIntroVlad_group.peds.ped_1, "cower stand variant 1") 
  708. 	set_animation_state(mIntroVlad_group.peds.ped_2, "cower stand variant 3") 
  709. 	set_animation_state(mIntroVlad_group.peds.ped_3,  "cower stand variant 4") 
  710. 	set_animation_state(mIntroVlad_group.peds.ped_4, "cower stand variant 2") 
  711. 	set_animation_state(mIntroVlad_group.peds.ped_5, "cower stand variant 3") 
  712. 	set_animation_state(mIntroVlad_group.peds.ped_6, "cower stand variant 4") 
  713. 	set_animation_state(mIntroVlad_group.peds.ped_7, "cower stand variant 1") 
  714. 	group_create(mIntroVlad_group.vlad_group, true) 
  715. 	character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"back liedown") 
  716. 	set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "prison") 
  717.  
  718. 	group_create(mIntroVlad_group.care_animals_group, true) 
  719. 	group_create(mIntroVlad_group.guards_group, true) 
  720. 	set_script_animation_state(mIntroVlad_group.guards_group.dj_1, "dance") 
  721. 	 
  722. 	on_take_damage("Stop_Dancing", "demon_dj<001>") 
  723.  
  724. 	npc_leash_to_nav("demon_dj<001>", "Nav<007>", 1.0, false) 
  725. 	npc_leash_to_nav("demon_guard<001>", "Nav<001>", 2.0, false) 
  726. 	npc_leash_to_nav("demon_guard<002>", "Nav<002>", 2.0, false) 
  727. 	npc_leash_to_nav("demon_guard<003>", "Nav<003>", 2.0, false) 
  728. 	npc_leash_to_nav("demon_guard<004>", "Nav<004>", 2.0, false) 
  729. 	npc_leash_to_nav("demon_guard<005>", "Nav<005>", 2.0, false) 
  730. 	npc_leash_to_nav("demon_guard<006>", "Nav<006>", 2.0, false) 
  731.  
  732. 	 
  733. 	set_ignore_ai_flag("demon_guard<001>",true) 
  734. 	set_ignore_ai_flag("demon_guard<002>",true) 
  735. 	set_ignore_ai_flag("demon_guard<003>",true) 
  736. 	set_ignore_ai_flag("demon_guard<004>",true) 
  737. 	set_ignore_ai_flag("demon_guard<005>",true) 
  738. 	set_ignore_ai_flag("demon_guard<006>",true) 
  739. 	set_ignore_ai_flag("head_guard<001>",true) 
  740. 	set_ignore_ai_flag("head_guard<002>",true) 
  741. 	set_ignore_ai_flag("head_guard<003>",true) 
  742. 	set_ignore_ai_flag(mIntroVlad_group.vlad_group.vlad_npc,true) 
  743. 	 
  744. 	turn_invulnerable ("demon_guard<001>", false) 
  745. 	turn_invulnerable ("demon_guard<002>", false) 
  746. 	turn_invulnerable ("demon_guard<003>", false) 
  747. 	turn_invulnerable ("demon_guard<004>", false) 
  748. 	turn_invulnerable ("demon_guard<005>", false) 
  749. 	turn_invulnerable ("demon_guard<006>", false) 
  750. 	turn_invulnerable ("demon_dj<001>", false) 
  751. 	turn_invulnerable("head_guard<001>",false) 
  752. 	turn_invulnerable("head_guard<002>",false) 
  753. 	turn_invulnerable("head_guard<003>",false) 
  754. 	turn_invulnerable(mIntroVlad_group.peds.ped_1, false) 
  755. 	turn_invulnerable(mIntroVlad_group.peds.ped_2, false) 
  756. 	turn_invulnerable(mIntroVlad_group.peds.ped_3, false) 
  757. 	turn_invulnerable(mIntroVlad_group.peds.ped_4, false) 
  758. 	turn_invulnerable(mIntroVlad_group.peds.ped_5, false) 
  759. 	turn_invulnerable(mIntroVlad_group.peds.ped_6, false) 
  760. 	turn_invulnerable(mIntroVlad_group.peds.ped_7, false) 
  761. 	turn_invulnerable(mIntroVlad_group.care_animals_group.care_devil_1, false) 
  762. 	turn_invulnerable(mIntroVlad_group.care_animals_group.care_devil_2, false) 
  763. 	turn_invulnerable("care_devil<003>", false) 
  764. 	turn_invulnerable("care_devil<004>", false) 
  765. 	turn_invulnerable("care_devil<005>", false) 
  766. 	turn_invulnerable("care_devil<006>", false) 
  767. 	turn_invulnerable("care_devil<007>", false) 
  768. 	turn_invulnerable("care_devil<008>", false) 
  769. 	turn_invulnerable("care_devil<009>", false) 
  770. 	turn_invulnerable("care_devil<010>", false) 
  771.  
  772.  
  773.  
  774.  
  775. 	human_gravity_enable ("demon_guard<001>", false) 
  776. 	human_gravity_enable ("demon_guard<002>", false) 
  777. 	human_gravity_enable ("demon_guard<003>", false) 
  778. 	human_gravity_enable ("demon_guard<004>", false) 
  779. 	human_gravity_enable ("demon_guard<005>", false) 
  780. 	human_gravity_enable ("demon_guard<006>", false) 
  781. 	human_gravity_enable ("demon_dj<001>", false) 
  782. 	human_gravity_enable("head_guard<001>",false) 
  783. 	human_gravity_enable("head_guard<002>",false) 
  784. 	human_gravity_enable("head_guard<003>",false) 
  785. 	human_gravity_enable(mIntroVlad_group.peds.ped_1, false) 
  786. 	human_gravity_enable(mIntroVlad_group.peds.ped_2, false) 
  787. 	human_gravity_enable(mIntroVlad_group.peds.ped_3, false) 
  788. 	human_gravity_enable(mIntroVlad_group.peds.ped_4, false) 
  789. 	human_gravity_enable(mIntroVlad_group.peds.ped_5, false) 
  790. 	human_gravity_enable(mIntroVlad_group.peds.ped_6, false) 
  791. 	human_gravity_enable(mIntroVlad_group.peds.ped_7, false) 
  792. 	human_gravity_enable(mIntroVlad_group.care_animals_group.care_devil_1, false) 
  793. 	human_gravity_enable(mIntroVlad_group.care_animals_group.care_devil_2, false) 
  794. 	human_gravity_enable("care_devil<003>", false) 
  795. 	human_gravity_enable("care_devil<004>", false) 
  796. 	human_gravity_enable("care_devil<005>", false) 
  797. 	human_gravity_enable("care_devil<006>", false) 
  798. 	human_gravity_enable("care_devil<007>", false) 
  799. 	human_gravity_enable("care_devil<008>", false) 
  800. 	human_gravity_enable("care_devil<009>", false) 
  801. 	human_gravity_enable("care_devil<010>", false) 
  802.  
  803. 	character_collision_enable ("demon_guard<001>", false) 
  804. 	character_collision_enable ("demon_guard<002>", false) 
  805. 	character_collision_enable ("demon_guard<003>", false) 
  806. 	character_collision_enable ("demon_guard<004>", false) 
  807. 	character_collision_enable ("demon_guard<005>", false) 
  808. 	character_collision_enable ("demon_guard<006>", false) 
  809. 	character_collision_enable ("demon_dj<001>", false) 
  810. 	character_collision_enable("head_guard<001>",false) 
  811. 	character_collision_enable("head_guard<002>",false) 
  812. 	character_collision_enable("head_guard<003>",false) 
  813. 	character_collision_enable(mIntroVlad_group.peds.ped_1, false) 
  814. 	character_collision_enable(mIntroVlad_group.peds.ped_2, false) 
  815. 	character_collision_enable(mIntroVlad_group.peds.ped_3, false) 
  816. 	character_collision_enable(mIntroVlad_group.peds.ped_4, false) 
  817. 	character_collision_enable(mIntroVlad_group.peds.ped_5, false) 
  818. 	character_collision_enable(mIntroVlad_group.peds.ped_6, false) 
  819. 	character_collision_enable(mIntroVlad_group.peds.ped_7, false) 
  820. 	character_collision_enable(mIntroVlad_group.care_animals_group.care_devil_1, false) 
  821. 	character_collision_enable(mIntroVlad_group.care_animals_group.care_devil_2, false) 
  822. 	character_collision_enable("care_devil<003>", false) 
  823. 	character_collision_enable("care_devil<004>", false) 
  824. 	character_collision_enable("care_devil<005>", false) 
  825. 	character_collision_enable("care_devil<006>", false) 
  826. 	character_collision_enable("care_devil<007>", false) 
  827. 	character_collision_enable("care_devil<008>", false) 
  828. 	character_collision_enable("care_devil<009>", false) 
  829. 	character_collision_enable("care_devil<010>", false) 
  830. 	 
  831. 	delay(.1) 
  832. 	character_enable_superpower_immunity ("demon_guard<001>", true) 
  833. 	character_enable_superpower_immunity ("demon_guard<002>", true) 
  834. 	character_enable_superpower_immunity ("demon_guard<003>", true) 
  835. 	character_enable_superpower_immunity ("demon_guard<004>", true) 
  836. 	character_enable_superpower_immunity ("demon_guard<005>", true) 
  837. 	character_enable_superpower_immunity ("demon_guard<006>", true) 
  838. 	character_enable_superpower_immunity ("demon_dj<001>", true) 
  839. 	character_enable_superpower_immunity("head_guard<001>",true) 
  840. 	character_enable_superpower_immunity("head_guard<002>",true) 
  841. 	character_enable_superpower_immunity("head_guard<003>",true) 
  842. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_1, true) 
  843. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_2, true) 
  844. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_3, true) 
  845. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_4, true) 
  846. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_5, true) 
  847. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_6, true) 
  848. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_7, true) 
  849. 	character_enable_superpower_immunity(mIntroVlad_group.care_animals_group.care_devil_1, true) 
  850. 	character_enable_superpower_immunity(mIntroVlad_group.care_animals_group.care_devil_2, true) 
  851. 	character_enable_superpower_immunity("care_devil<003>", true) 
  852. 	character_enable_superpower_immunity("care_devil<004>", true) 
  853. 	character_enable_superpower_immunity("care_devil<005>", true) 
  854. 	character_enable_superpower_immunity("care_devil<006>", true) 
  855. 	character_enable_superpower_immunity("care_devil<007>", true) 
  856. 	character_enable_superpower_immunity("care_devil<008>", true) 
  857. 	character_enable_superpower_immunity("care_devil<009>", true) 
  858. 	character_enable_superpower_immunity("care_devil<010>", true) 
  859.  
  860.  
  861. 	-- if this is the first time through. 
  862. 	on_door_opened("mIntroVlad_OpenDoor", mVladIntro_movers.hall_door.mover) 
  863. 	while mIntroVlad_runtime.bDoorOpened == false do 
  864. 			thread_yield() 
  865. 	end 
  866. 	 
  867. 	character_enable_superpower_immunity ("demon_guard<001>", false) 
  868. 	character_enable_superpower_immunity ("demon_guard<002>", false) 
  869. 	character_enable_superpower_immunity ("demon_guard<003>", false) 
  870. 	character_enable_superpower_immunity ("demon_guard<004>", false) 
  871. 	character_enable_superpower_immunity ("demon_guard<005>", false) 
  872. 	character_enable_superpower_immunity ("demon_guard<006>", false) 
  873. 	character_enable_superpower_immunity ("demon_dj<001>", false) 
  874. 	character_enable_superpower_immunity("head_guard<001>",false) 
  875. 	character_enable_superpower_immunity("head_guard<002>",false) 
  876. 	character_enable_superpower_immunity("head_guard<003>",false) 
  877. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_1, false) 
  878. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_2, false) 
  879. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_3, false) 
  880. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_4, false) 
  881. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_5, false) 
  882. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_6, false) 
  883. 	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_7, false) 
  884. 	character_enable_superpower_immunity(mIntroVlad_group.care_animals_group.care_devil_1, false) 
  885. 	character_enable_superpower_immunity(mIntroVlad_group.care_animals_group.care_devil_2, false) 
  886. 	character_enable_superpower_immunity("care_devil<003>", false) 
  887. 	character_enable_superpower_immunity("care_devil<004>", false) 
  888. 	character_enable_superpower_immunity("care_devil<005>", false) 
  889. 	character_enable_superpower_immunity("care_devil<006>", false) 
  890. 	character_enable_superpower_immunity("care_devil<007>", false) 
  891. 	character_enable_superpower_immunity("care_devil<008>", false) 
  892. 	character_enable_superpower_immunity("care_devil<009>", false) 
  893. 	character_enable_superpower_immunity("care_devil<010>", false) 
  894. 	 
  895.  
  896. 	character_collision_enable ("demon_guard<001>", true) 
  897. 	character_collision_enable ("demon_guard<002>", true) 
  898. 	character_collision_enable ("demon_guard<003>", true) 
  899. 	character_collision_enable ("demon_guard<004>", true) 
  900. 	character_collision_enable ("demon_guard<005>", true) 
  901. 	character_collision_enable ("demon_guard<006>", true) 
  902. 	character_collision_enable ("demon_dj<001>", true) 
  903. 	character_collision_enable("head_guard<001>",true) 
  904. 	character_collision_enable("head_guard<002>",true) 
  905. 	character_collision_enable("head_guard<003>",true) 
  906. 	character_collision_enable(mIntroVlad_group.peds.ped_1, true) 
  907. 	character_collision_enable(mIntroVlad_group.peds.ped_2, true) 
  908. 	character_collision_enable(mIntroVlad_group.peds.ped_3, true) 
  909. 	character_collision_enable(mIntroVlad_group.peds.ped_4, true) 
  910. 	character_collision_enable(mIntroVlad_group.peds.ped_5, true) 
  911. 	character_collision_enable(mIntroVlad_group.peds.ped_6, true) 
  912. 	character_collision_enable(mIntroVlad_group.peds.ped_7, true) 
  913. 	character_collision_enable(mIntroVlad_group.care_animals_group.care_devil_1, true) 
  914. 	character_collision_enable(mIntroVlad_group.care_animals_group.care_devil_2, true) 
  915. 	character_collision_enable("care_devil<003>", true) 
  916. 	character_collision_enable("care_devil<004>", true) 
  917. 	character_collision_enable("care_devil<005>", true) 
  918. 	character_collision_enable("care_devil<006>", true) 
  919. 	character_collision_enable("care_devil<007>", true) 
  920. 	character_collision_enable("care_devil<008>", true) 
  921. 	character_collision_enable("care_devil<009>", true) 
  922. 	character_collision_enable("care_devil<010>", true) 
  923.  
  924.  
  925.  
  926. 	set_ignore_ai_flag("demon_guard<001>",false) 
  927. 	set_ignore_ai_flag("demon_guard<002>",false) 
  928. 	set_ignore_ai_flag("demon_guard<003>",false) 
  929. 	set_ignore_ai_flag("demon_guard<004>",false) 
  930. 	set_ignore_ai_flag("demon_guard<005>",false) 
  931. 	set_ignore_ai_flag("demon_guard<006>",false) 
  932. 	set_ignore_ai_flag("head_guard<001>",false) 
  933. 	set_ignore_ai_flag("head_guard<002>",false) 
  934. 	set_ignore_ai_flag("head_guard<003>",false) 
  935.  
  936. 	on_seamless_animated_moment_end("mVladIntro_Sam_Complete") 
  937. 	local actor_list = {  LOCAL_PLAYER, mIntroVlad_group.vlad_group.vlad_npc, mIntroVlad_group.care_animals_group.care_devil_1,  mIntroVlad_group.care_animals_group.care_devil_2 } 
  938. 	seamless_animated_moment_prep("SAM_Vlads_Intro", actor_list) 
  939. 	seamless_animated_moment_start("SAM_Vlads_Intro", actor_list) 
  940. 	delay(1.0) 
  941. 	audio_object_post_event("Play_CottenEyedJoe") 
  942. 	audio_object_post_event("Play_mIntroVlad_stingers") 
  943. 	clear_animation_state(mIntroVlad_group.vlad_group.vlad_npc) 
  944. 	while(mIntroVlad_runtime.bIntroCinemaDone == false) do 
  945. 		thread_yield() 
  946. 	end 
  947. 	set_ignore_ai_flag(mIntroVlad_group.vlad_group.vlad_npc,false) 
  948. 	 
  949. 	clear_animation_state(mIntroVlad_group.vlad_group.vlad_npc) 
  950. 	--	action_play(mIntroVlad_homie.vlad, "back liedown","",true); 
  951.  
  952.  
  953. end 
  954.  
  955. -- Do any cleanup for this checkpoint. 
  956. -- 
  957. -- (+++THIS IS CALLED FROM MISSION CLEANUP, MUST RETURN IMMEDIATELY+++) 
  958. -- 
  959. -- mission_exit: (bool) Whether we're exiting the mission entirely, or just 
  960. --					moving on to the next checkpoint. 
  961. -- 
  962. function mIntroVlad_prison_cleanup(mission_exit) 
  963.  
  964. 	--[[ INSERT ANY MISSION SPECIFIC CLEAN-UP ]]-- 
  965.  
  966.  
  967. end 
  968. function mIntroVlad_cp2_init(mission_start) 
  969. 	if mission_start then 
  970. 		group_create(mIntroVlad_group.peds, true) 
  971. 		audio_object_post_event("Play_CottenEyedJoe") 
  972. 		delay(.2) 
  973. 		set_animation_state(mIntroVlad_group.peds.ped_1, "fetal cry") 
  974. 		set_animation_state(mIntroVlad_group.peds.ped_2, "cower stand variant 3") 
  975. 		set_animation_state(mIntroVlad_group.peds.ped_3,  "cower stand variant 4") 
  976. 		set_animation_state(mIntroVlad_group.peds.ped_4, "cower stand variant 2") 
  977. 		set_animation_state(mIntroVlad_group.peds.ped_5, "cower stand variant 3") 
  978. 		set_animation_state(mIntroVlad_group.peds.ped_6, "cower stand variant 4") 
  979. 		set_animation_state(mIntroVlad_group.peds.ped_7, "cower stand variant 1") 
  980. 		delay(.2) 
  981. 		group_create(mIntroVlad_group.vlad_group, true) 
  982. 		character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"back liedown") 
  983. --		set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "prison") 
  984.  
  985.  
  986. 		--set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "prison") 
  987. 		character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"back liedown") 
  988.  
  989. 		--turn_invulnerable(name[, allow_player_damage]) 
  990.  
  991. 		group_create(mIntroVlad_group.care_animals_group, true) 
  992. 		delay(.2) 
  993. 		group_create(mIntroVlad_group.guards_group, true) 
  994. 		for i, wave_member in pairs( mIntroVlad_group.care_animals_group.members ) do 
  995. 			turn_invulnerable (wave_member) 
  996. 		end 
  997. 		for i, wave_member in pairs( mIntroVlad_group.guards_group.members) do 
  998. 			turn_invulnerable (wave_member) 
  999. 		end 
  1000. 		set_animation_state(mIntroVlad_group.guards_group.dj_1, "dance") 
  1001. 	 
  1002. 		on_take_damage("Stop_Dancing", "demon_dj<001>") 
  1003. 		npc_leash_to_nav("demon_dj<001>", "Nav<007>", 1.0, false) 
  1004. 		npc_leash_to_nav("demon_guard<001>", "Nav<001>", 2.0, false) 
  1005. 		npc_leash_to_nav("demon_guard<002>", "Nav<002>", 2.0, false) 
  1006. 		npc_leash_to_nav("demon_guard<003>", "Nav<003>", 2.0, false) 
  1007. 		npc_leash_to_nav("demon_guard<004>", "Nav<004>", 2.0, false) 
  1008. 		npc_leash_to_nav("demon_guard<005>", "Nav<005>", 2.0, false) 
  1009. 		npc_leash_to_nav("demon_guard<006>", "Nav<006>", 2.0, false) 
  1010. 		teleport_coop("player_start_client_cp2", "player_start_host_cp2", true)	 
  1011. 	end 
  1012. end 
  1013. function mIntroVlad_cp2_run() 
  1014. 	turn_vulnerable ("demon_guard<001>") 
  1015. 	turn_vulnerable ("demon_guard<002>") 
  1016. 	turn_vulnerable ("demon_guard<003>") 
  1017. 	turn_vulnerable ("demon_guard<004>") 
  1018. 	turn_vulnerable ("demon_guard<005>") 
  1019. 	turn_vulnerable ("demon_guard<006>") 
  1020. 	turn_vulnerable ("demon_dj<001>") 
  1021. 	turn_vulnerable("head_guard<001>") 
  1022. 	turn_vulnerable("head_guard<002>") 
  1023. 	turn_vulnerable("head_guard<003>") 
  1024. 	turn_vulnerable(mIntroVlad_group.peds.ped_1) 
  1025. 	turn_vulnerable(mIntroVlad_group.peds.ped_2) 
  1026. 	turn_vulnerable(mIntroVlad_group.peds.ped_3) 
  1027. 	turn_vulnerable(mIntroVlad_group.peds.ped_4) 
  1028. 	turn_vulnerable(mIntroVlad_group.peds.ped_5) 
  1029. 	turn_vulnerable(mIntroVlad_group.peds.ped_6) 
  1030. 	turn_vulnerable(mIntroVlad_group.peds.ped_7) 
  1031. 	turn_vulnerable(mIntroVlad_group.care_animals_group.care_devil_1) 
  1032. 	turn_vulnerable(mIntroVlad_group.care_animals_group.care_devil_2) 
  1033. 	turn_vulnerable("care_devil<003>") 
  1034. 	turn_vulnerable("care_devil<004>") 
  1035. 	turn_vulnerable("care_devil<005>") 
  1036. 	turn_vulnerable("care_devil<006>") 
  1037. 	turn_vulnerable("care_devil<007>") 
  1038. 	turn_vulnerable("care_devil<008>") 
  1039. 	turn_vulnerable("care_devil<009>") 
  1040. 	turn_vulnerable("care_devil<010>") 
  1041. 	party_add(mIntroVlad_homie.vlad, LOCAL_PLAYER) 
  1042. 	marker_add( mIntroVlad_homie.vlad, MINIMAP_ICON_SAINTS, OI_ASSET_REVIVE ) 
  1043.  
  1044. 	human_ignore_next_death_anim(mIntroVlad_homie.vlad, true) 
  1045. 	--action_play(mIntroVlad_homie.vlad, "back liedown","",true); 
  1046. 	human_enter_downed( mIntroVlad_homie.vlad ) 
  1047. 	-- set up vlad 
  1048.  
  1049. 	 
  1050. 	 
  1051. 	 
  1052. 	follower_set_can_abandon( mIntroVlad_homie.vlad, false ) 
  1053. 	on_death ( "mIntroVlad_failure_vlad_died_cb", mIntroVlad_homie.vlad ) 
  1054. 	on_dismiss ( "mIntroVlad_failure_dismissed_cb", mIntroVlad_homie.vlad ) 
  1055. 	party_set_dismissable(false) 
  1056.  
  1057.  
  1058. 	if mIntroVlad_group.guards_group.head_guard ~= nil then 
  1059. 		ai_add_enemy_target(mIntroVlad_group.guards_group.head_guard, LOCAL_PLAYER, ATTACK_NOW) 
  1060. 	end 
  1061. 	 
  1062. 	--this is stuff about waiting until the homie is revived 
  1063. 	objective_text(0,"GM_DRAINED_OBJ_REVIVE_VLAD","","",SYNC_ALL,OI_ASSET_REVIVE) 
  1064. 	while (human_is_downed( mIntroVlad_homie.vlad ) == true)do 
  1065. 		thread_yield() 
  1066. 	end 
  1067. 	while (character_is_dead(mIntroVlad_homie.vlad) == true)do 
  1068. 		thread_yield() 
  1069. 	end 
  1070.  
  1071. 	marker_remove( mIntroVlad_homie.vlad )	 
  1072. 	character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"") 
  1073. 	--set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "") 
  1074. 	objective_text_clear(0) 
  1075. 	objective_text(0,"MVLADINTRO_OBJECTIVE_ENEMIES","","",SYNC_ALL,OI_ASSET_KILL) 
  1076. 	kill_list_add(mIntroVlad_group.guards_group.members, OI_ASSET_KILL) 
  1077.  
  1078. 	delay( 1.0 ) 
  1079. 	character_add_prop(mIntroVlad_group.vlad_group.vlad_npc, "Vlad-ColdFireBuff") 
  1080. 	-- Pick up your homie	 
  1081. 	--mIntroVlad_wait_until_homie_revived( Blackbeard ) 
  1082.  
  1083. 	-- if player is johnny, play johnny line. If not, play kinzie line 
  1084. 	if character_get_anim_set(LOCAL_PLAYER) == "PLYM" then 
  1085. 		convo_start(mIntroVlad_convo.Gat_Convo_A) 
  1086. 	else 
  1087. 		convo_start(mIntroVlad_convo.Kinzie_Convo_A) 
  1088. 	end    
  1089.  
  1090. 	delay(8.0) 
  1091.  
  1092. 	group_create(mIntroVlad_group.winged_group, true) 
  1093. 	kill_list_add(mIntroVlad_group.winged_group.members, OI_ASSET_KILL) 
  1094.  
  1095. 	delay(6.0) 
  1096.  
  1097. 	group_create(mIntroVlad_group.shadow_group, true) 
  1098. 	kill_list_add(mIntroVlad_group.shadow_group.members, OI_ASSET_KILL) 
  1099. 	 
  1100. 	-- HVS_JBG 7/25/2014 - since we're indoors, we want them to have navpoints. 
  1101. 	-- this way they won't fallback on the raycast method of teleporting and wind up out in the world somewhere. 
  1102. 	human_use_teleport_navpoints(mIntroVlad_group.shadow_group.members[1], true) 
  1103. 	human_use_teleport_navpoints(mIntroVlad_group.shadow_group.members[2], true) 
  1104. 	 
  1105. 	human_clear_teleport_navpoints(mIntroVlad_group.shadow_group.members[1]) 
  1106. 	human_clear_teleport_navpoints(mIntroVlad_group.shadow_group.members[2]) 
  1107. 	 
  1108. 	for index, navp in pairs( mIntroVlad_shadow_demon_navpoints.navs ) do 
  1109. 		human_add_teleport_navpoint(mIntroVlad_group.shadow_group.members[1], navp) 
  1110. 		human_add_teleport_navpoint(mIntroVlad_group.shadow_group.members[2], navp) 
  1111. 	end 
  1112. 		 
  1113. 	kill_list_wait_for_complete() 
  1114. 	objective_text_clear(0) 
  1115.  
  1116. 	delay(2.0) 
  1117. 		 
  1118. 	convo_start(mIntroVlad_convo.destroy_music)  
  1119. 	 
  1120. 	objective_text(0, "MVLADINTRO_OBJECTIVE_MUSIC", "", "", SYNC_ALL, OI_ASSET_USE ) 
  1121. 	trigger_setup( mIntroVlad_trigger.Music_Trigger ) 
  1122.  
  1123. 	while (mIntroVlad_trigger.Music_Trigger.hit == false) do 
  1124. 		thread_yield() 
  1125. 	end 
  1126.  
  1127. 	audio_object_post_event("Stop_CottenEyedJoe") 
  1128. 	objective_text_clear(0) 
  1129. 	delay( 1.0 ) 
  1130. 	convo_start(mIntroVlad_convo.vlad_end) 
  1131. convo_wait_for_end() 
  1132.  
  1133. 	player_controls_disable(LOCAL_PLAYER) 
  1134. 	if coop_is_active() then 
  1135. 		player_controls_enable(REMOTE_PLAYER) 
  1136. 	end 
  1137. 	cutscene_play(mIntroVlad_scene.outro, nil, {mIntroVlad_navpoints.player_1_teleport_nav, mIntroVlad_navpoints.player_2_teleport_nav}, true ) 
  1138. 	party_dismiss(mIntroVlad_homie.vlad) 
  1139. 	teleport( mIntroVlad_homie.vlad, mIntroVlad_navpoints.vlad_teleport_nav) 
  1140. 	character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"") 
  1141. 	set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "stand") 
  1142. 	if cutscene_check_exiting() then 
  1143. 		thread_yield()		 
  1144. 	end 
  1145. 	convo_start(mIntroVlad_convo.grant_aura) 
  1146. 	delay(3) 
  1147. 		-- Have player(s) fully power up (non-blocking) 
  1148. 	local anim_name = "altars_powerup" 
  1149. 	local morph_name = anim_name 
  1150. 	local force_play = false 
  1151. 	local stand_still = true 
  1152. 	local zero_movement = true 
  1153. 	effect_play_on_human( mIntroVladVFX.power_up.name, LOCAL_PLAYER, "spine2" ) 
  1154. 	action_play_non_blocking(LOCAL_PLAYER, anim_name, morph_name, force_play, stand_still, zero_movement, "tele_host") 
  1155. 	if coop_is_active() then 
  1156. 		effect_play_on_human( mIntroVladVFX.power_up.name, REMOTE_PLAYER, "spine2"  ) 
  1157. 		action_play_non_blocking(REMOTE_PLAYER, anim_name, morph_name, force_play, stand_still, zero_movement, "tele_client") 
  1158. 	end 
  1159. 	 
  1160. 	-- Wait for player to react 
  1161. 	delay(6) 
  1162. 	fade_out(1) 
  1163. 	fade_out_block() 
  1164. 	force_spawn_contacts() 
  1165. 	player_super_power_select( "Aura", SYNC_ALL, "aura_coldfire" ) 
  1166. end 
  1167.  
  1168. function mIntroVlad_cp2_cleanup(mission_exit) 
  1169.  
  1170. end 
  1171.  
  1172. ------------------------------------ 
  1173. -- 
  1174. -- Checkpoint helper functions 
  1175. -- 
  1176. ------------------------------------ 
  1177.  
  1178. ------------------------------------ 
  1179. -- 
  1180. -- Checkpoint callback functions 
  1181. -- 
  1182. ------------------------------------ 
  1183. function Stop_Dancing() 
  1184. 	set_script_animation_state(mIntroVlad_group.guards_group.dj_1, nil) 
  1185. end 
  1186.  
  1187.  
  1188. function mIntroVlad_OpenDoor() 
  1189. 	mIntroVlad_runtime.bDoorOpened = true 
  1190.  
  1191. end 
  1192. function mIntroVlad_failure_vlad_died_cb() 
  1193. 	mission_end_failure("mIntroVlad", "GM_MINTROVLAD_VLAD_DIED") 
  1194. end 
  1195.  
  1196. function mIntroVlad_failure_dismissed_cb() 
  1197. 	mission_end_failure("mIntroVlad", "GM_MINTROVLAD_FAIL_VLAD_DIS") 
  1198. end 
  1199. ------------------------------------ 
  1200. -- 
  1201. -- Checkpoint thread functions 
  1202. -- 
  1203. ------------------------------------ 
  1204.  
  1205.  
  1206. -------------------------------------------------------------------------------------------------- 
  1207. --[[ 
  1208.  
  1209.    _____                                        ______                _   _                  
  1210.   / ____|                                      |  ____|              | | (_)                 
  1211.  | |     ___  _ __ ___  _ __ ___   ___  _ __   | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  1212.  | |    / _ \| '_ ` _ \| '_ ` _ \ / _ \| '_ \  |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  1213.  | |___| (_) | | | | | | | | | | | (_) | | | | | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  1214.   \_____\___/|_| |_| |_|_| |_| |_|\___/|_| |_| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  1215. 																							 
  1216. 																							 
  1217. ]]-- 
  1218.  
  1219. function mVladIntro_Sam_Complete() 
  1220. 	mIntroVlad_runtime.bIntroCinemaDone = true 
  1221. end 
  1222.  
  1223. 	function CleanupTriggers() 
  1224. 		mIntroVlad_trigger.Music_Trigger.callback = "" 
  1225. 	end 
  1226.  
  1227. function mIntroVlad_cleanup_homies() 
  1228. 	if mIntroVlad_homie.vlad ~= nil then 
  1229. 		on_death("", mIntroVlad_homie.vlad) 
  1230. 		on_dismiss("", mIntroVlad_homie.vlad) 
  1231. 	end 
  1232. end 
  1233.  
  1234. --Reinforcement spawn 
  1235. function mIntroVlad_attack(group) 
  1236. 	local block = true 
  1237. 	local should_run = true 
  1238. 	local should_fire = false 
  1239. 	group_create( group.name, true, block ) 
  1240. 	for index, npc in pairs( group.members ) do 
  1241. 		ai_do_scripted_move( npc, group.destination, should_run, should_fire ) 
  1242. 	end 
  1243. end 
  1244.  
  1245. --Thread Killer 
  1246. function mIntroVlad_safe_thread_kill( thread ) 
  1247. 	 
  1248. 	if( thread ~= nil )	then 
  1249. 		if( thread ~= INVALID_THREAD_HANDLE) then 
  1250. 			thread_kill( thread ) 
  1251. 			thread = INVALID_THREAD_HANDLE 
  1252. 		end 
  1253. 	end 
  1254.  
  1255. end 
  1256. --[[ 
  1257. function mIntroVlad_wait_until_homie_revived( homie ) 
  1258.  
  1259. 	-- Doesn't matter who revived them, so long as someone did. 
  1260. 	while(human_is_downed( homie ) == false)do 
  1261. 		thread_yield() 
  1262. 	end 
  1263. 	objective_text_clear(1) 
  1264. end 
  1265. ]]-- 
  1266. -------------------------------------------------------------------------------------------------- 
  1267. --[[ 
  1268.  
  1269.    _____      _ _ _                _      ______                _   _                  
  1270.   / ____|    | | | |              | |    |  ____|              | | (_)                 
  1271.  | |     __ _| | | |__   __ _  ___| | __ | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  1272.  | |    / _` | | | '_ \ / _` |/ __| |/ / |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  1273.  | |___| (_| | | | |_) | (_| | (__|   <  | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  1274.   \_____\__,_|_|_|_.__/ \__,_|\___|_|\_\ |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  1275. 																					   
  1276. 																					   
  1277. ]]-- 
  1278.  
  1279. function mIntroVlad_failure_vald_died_cb() 
  1280. 	mission_end_failure("mIntroVlad", "GM_MINTROVLAD_FAIL_VLAD_DIED") 
  1281. end 
  1282.  
  1283. function mIntroVlad_failure_dismissed_cb() 
  1284. 	mission_end_failure("mIntroVlad", "GM_MINTROVLAD_FAIL_VLAD_DIS") 
  1285. end 
  1286. -------------------------------------------------------------------------------------------------- 
  1287. --[[ 
  1288.  
  1289.   _______ _                        _   ______                _   _                  
  1290.  |__   __| |                      | | |  ____|              | | (_)                 
  1291. 	| |  | |__  _ __ ___  __ _  __| | | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
  1292. 	| |  | '_ \| '__/ _ \/ _` |/ _` | |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
  1293. 	| |  | | | | | |  __/ (_| | (_| | | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
  1294. 	|_|  |_| |_|_|  \___|\__,_|\__,_| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
  1295. 																				    
  1296. 																				    
  1297. ]]-- 
  1298.  
  1299.