--[[ 
 
	mIntroVlad.lua 
 
	SRG Map Event Script 
 
	DATE: 2014-05-09 
 
	AUTHOR:	Jim Butts 
 
]]-- 
 
 
 
-- Tweakable Parameters -- 
 
local SUPERPOWER_AURA = 2 
 
 
 
 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
   _____                            
 
  / ____|                           
 
 | |  __ _ __ ___  _   _ _ __  ___  
 
 | | |_ | '__/ _ \| | | | '_ \/ __| 
 
 | |__| | | | (_) | |_| | |_) \__ \ 
 
  \_____|_|  \___/ \__,_| .__/|___/ 
 
						| |         
 
						|_|         
 
 
 
]]-- 
 
-------------------------------------------------------------------------------------------------- 
 
	mIntroVlad_group =  
 
	{  
		vlad_group = 
 
		{  
			name = "vlad_group", 
 
			members = 
 
			{  
				"Vlad", 
 
			}, 
 
			vlad_npc = "Vlad", 
 
		--"prison" is anim tag vlad_prsn_st.animx 
 
		}, 
 
		SAM_Vlads_Intro = {  
			name = "SAM_Vlads_Intro", 
 
		}, 
 
		care_animals_group = 
 
		{  
			name = "care_devils", 
 
			members = 
 
			{  
				"care_devil<001>", 
 
				"care_devil<002>", 
 
				"care_devil<003>", 
 
				"care_devil<004>", 
 
				"care_devil<005>", 
 
				"care_devil<006>", 
 
				"care_devil<007>", 
 
				"care_devil<008>", 
 
				"care_devil<009>", 
 
				"care_devil<010>", 
 
			}, 
 
			care_devil_1 = "care_devil<001>", 
 
			care_devil_2 = "care_devil<002>", 
 
		}, 
 
 
 
		peds =  
 
		{  
			name = "peds_group", 
 
			members = 
 
			{  
				"Ped<001>", 
 
				"Ped<002>", 
 
				"Ped<003>", 
 
				"Ped<004>", 
 
				"Ped<005>", 
 
				"Ped<006>", 
 
				"Ped<007>",  
 
				"Ped<008>",  
 
				"Ped<009>",  
 
				"Ped<010>",  
 
			--	"Ped<011>",  
 
			--	"Ped<011>",  
 
			}, 
 
			 
 
			ped_1 = "Ped<001>", 
 
			ped_2 = "Ped<002>", 
 
			ped_3 = "Ped<003>", 
 
			ped_4 = "Ped<004>", 
 
			ped_5 = "Ped<005>", 
 
			ped_6 = "Ped<006>", 
 
			ped_7 = "Ped<007>", 
 
			ped_8 = "Ped<008>", 
 
			ped_9 = "Ped<009>", 
 
			ped_10 = "Ped<010>", 
 
			--ped_11 = "Ped<011>", 
 
			--ped_12 = "Ped<012>", 
 
 
 
			-- ped animations 
 
			roundup_a_anim = { "roundup"},  
			roundup_b_anim = { "roundup b"},  
			roundup_c_anim = { "roundup c"},  
			cower_a = { "cower stand variant 1"},  
			cower_b = { "cower stand variant 2"},  
			cower_c = { "cower stand variant 3"},  
			cower_d = { "cower stand variant 4"},  
			impaled_a = { "impaled_a"},  
			impaled_b = { "impaled_b"},  
			impaled_c = { "impaled_c"},  
			 
 
			-- unique ped anims need to be preloaded 
 
			fetal = {"fetal cry"}, --life_fetalcry.animx  
		}, 
 
		guards_group = 
 
		{  
			name = "guards", 
 
			members = 
 
			{  
				"demon_guard<001>", 
 
				"demon_guard<002>", 
 
				"demon_guard<003>", 
 
				"demon_guard<004>", 
 
				"demon_guard<005>", 
 
				"demon_guard<006>", 
 
				"head_guard<001>", 
 
				"head_guard<002>",  
 
				"head_guard<003>", 
 
				"demon_dj<001>", 
 
			}, 
 
			dj_1 = "demon_dj<001>", 
 
			head_guard = "head_guard<001>", 
 
		}, 
 
 
 
		winged_group =  
 
		{  
			name = "winged_group", 
 
			members = {"winged_guard<001>", "winged_guard<002>", "winged_guard<003>", "winged_guard<004>" },  
		}, 
 
 
 
		shadow_group =  
 
		{  
			name = "shadow_group", 
 
			members = { "shadow_demon<001>", "shadow_demon<002>" },  
		}, 
 
	} 
 
 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
  _   _                         _       _        
 
 | \ | |                       (_)     | |       
 
 |  \| | __ ___   ___ __   ___  _ _ __ | |_ ___  
 
 | . ` |/ _` \ \ / / '_ \ / _ \| | '_ \| __/ __| 
 
 | |\  | (_| |\ V /| |_) | (_) | | | | | |_\__ \ 
 
 |_| \_|\__,_| \_/ | .__/ \___/|_|_| |_|\__|___/ 
 
				   | |                           
 
				   |_|                           
 
 
 
]]-- 
 
--------------------------------------------------------------------------------------------------	 
 
 
 
	mIntroVlad_navpoints =  
 
	{  
		player_1_teleport_nav = "tele_host", 
 
		player_2_teleport_nav = "tele_client", 
 
		vlad_teleport_nav = "tele_vlad", 
 
	} 
 
	 
 
	mIntroVlad_shadow_demon_navpoints =  
 
	{  
		navs = { "teleport_nav<001>", "teleport_nav<002>", "teleport_nav<003>", "teleport_nav<004>", "teleport_nav<005>", "teleport_nav<006>",   
				 "teleport_nav<007>", "teleport_nav<008>", "teleport_nav<009>", "teleport_nav<010>", "teleport_nav<011>", "teleport_nav<012>" },	 
 
	} 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
  _______ _                        _      
 
 |__   __| |                      | |     
 
	| |  | |__  _ __ ___  __ _  __| |___  
 
	| |  | '_ \| '__/ _ \/ _` |/ _` / __| 
 
	| |  | | | | | |  __/ (_| | (_| \__ \ 
 
	|_|  |_| |_|_|  \___|\__,_|\__,_|___/ 
 
										  
 
										  
 
]]-- 
 
-------------------------------------------------------------------------------------------------- 
 
	mIntroVlad_thread =  
 
	{  
 
 
	} 
 
 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
				 _             _   _           _        _____        _         
 
	 /\         (_)           | \ | |         | |      |  __ \      | |        
 
	/  \   _ __  _ _ __ ___   |  \| | ___   __| | ___  | |  | | __ _| |_ __ _  
 
   / /\ \ | '_ \| | '_ ` _ \  | . ` |/ _ \ / _` |/ _ \ | |  | |/ _` | __/ _` | 
 
  / ____ \| | | | | | | | | | | |\  | (_) | (_| |  __/ | |__| | (_| | || (_| | 
 
 /_/    \_\_| |_|_|_| |_| |_| |_| \_|\___/ \__,_|\___| |_____/ \__,_|\__\__,_| 
 
																			   
 
]]-- 
 
--------------------------------------------------------------------------------------------------      
 
 
 
	mIntroVlad_anim_node =  
 
	{  
 
 
	}	                                                                   
 
 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
   _____ _               _                _       _        
 
  / ____| |             | |              (_)     | |       
 
 | |    | |__   ___  ___| | ___ __   ___  _ _ __ | |_ ___  
 
 | |    | '_ \ / _ \/ __| |/ / '_ \ / _ \| | '_ \| __/ __| 
 
 | |____| | | |  __/ (__|   <| |_) | (_) | | | | | |_\__ \ 
 
  \_____|_| |_|\___|\___|_|\_\ .__/ \___/|_|_| |_|\__|___/ 
 
							 | |                           
 
							 |_|                           
 
 
 
]]-- 
 
-------------------------------------------------------------------------------------------------- 
 
	mIntroVlad_checkpoint =  
 
	{  
		--[[ CP1 MISSION START ]]-- 
 
		{  
			name = MISSION_START_CHECKPOINT, 
 
			init = "mIntroVlad_prison_init", 
 
			run = "mIntroVlad_prison_run", 
 
			cleanup = "mIntroVlad_prison_cleanup", 
 
			next_checkpoint = "Post_Sam_Checkpoint", 
 
			host_start = mIntroVlad_navpoints.player_1_teleport_nav, 
 
			client_start = mIntroVlad_navpoints.player_2_teleport_nav, 
 
			p1_car_nav = "", 
 
			p2_car_nav = "", 
 
			start_groups = { mIntroVlad_group.tank_01 },  
			cp_only_groups = {},  
		}, 
 
		 
 
		--CP2 
 
		{  
			name = "Post_Sam_Checkpoint", 
 
			init = "mIntroVlad_cp2_init", 
 
			run = "mIntroVlad_cp2_run", 
 
			cleanup = "mIntroVlad_cp2_cleanup", 
 
			next_checkpoint = "nil", 
 
			host_start = mIntroVlad_navpoints.player_1_teleport_nav, 
 
			client_start = mIntroVlad_navpoints.player_2_teleport_nav, 
 
			p1_car_nav = "", 
 
			p2_car_nav = "", 
 
			start_groups = { mIntroVlad_group.tank_01 },  
			cp_only_groups = {},  
		}, 
 
	} 
 
	 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
   _____      _                                 
 
  / ____|    | |                                
 
 | |    _   _| |_ ___  ___ ___ _ __   ___  ___  
 
 | |   | | | | __/ __|/ __/ _ \ '_ \ / _ \/ __| 
 
 | |___| |_| | |_\__ \ (_|  __/ | | |  __/\__ \ 
 
  \_____\__,_|\__|___/\___\___|_| |_|\___||___/ 
 
											    
 
											    
 
]]-- 
 
-------------------------------------------------------------------------------------------------- 
 
	mIntroVlad_scene =  
 
	{  
		intro = "", 
 
		outro = "Bink_Vlad_Rescued" 
 
	} 
 
 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
   _____                                    _   _                  
 
  / ____|                                  | | (_)                 
 
 | |     ___  _ ____   _____ _ __ ___  __ _| |_ _  ___  _ __  ___  
 
 | |    / _ \| '_ \ \ / / _ \ '__/ __|/ _` | __| |/ _ \| '_ \/ __| 
 
 | |___| (_) | | | \ V /  __/ |  \__ \ (_| | |_| | (_) | | | \__ \ 
 
  \_____\___/|_| |_|\_/ \___|_|  |___/\__,_|\__|_|\___/|_| |_|___/ 
 
																   
 
																   
 
]]-- 
 
-------------------------------------------------------------------------------------------------- 
 
 
 
	mIntroVlad_persona = {   
		Johnny = {  
			persona_name = "Johnny_Gat", 
 
			persona_id = INVALID_PERSONA_HANDLE 
 
		}, 
 
		Kinzie = {  
			persona_name = "Kinzie", 
 
			persona_id = INVALID_PERSONA_HANDLE 
 
		}, 
 
		Vlad = {  
			persona_name = "Vlad", 
 
			persona_id = INVALID_PERSONA_HANDLE 
 
		}, 
 
 
 
	} 
 
 
 
	mIntroVlad_convo =  
 
	{  
		--[[ = { 
 
			name = "file_name without voice (_bm, _wm, _bf...", 
 
			player_talks = true or false, 
 
			handle = INVALID_CONVERSATION_HANDLE, 
 
			convo_thread = INVALID_THREAD_HANDLE, 
 
			max_wait_seconds = 60,	-- if the conversation doesn't complete before this time, kill it 
 
			timer_thread = INVALID_THREAD_HANDLE, 
 
			priority = CONVO_PRIORITY_HIGH or CONVO_PRIORITY_NORMAL or CONVO_PRIORITY_OPTIONAL 
 
			(optional) persona_line = true,	-- this is a single line 
 
			(required if persona_line) speaker_name = "name of speaker",	-- single line speaker (might be set before call to play is made?) 
 
			(optional)phone_call = true,  -- this is a phone conversation (phone persona must be preloaded) 
 
			(required if phone_call) receiving_call = true or false  -- auto-answer is always true in missions (until proven otherwise) 
 
			 
 
		},]] 
 
		Gat_Convo_A = {  
			name = "mIntroVlad_con_gat_a", 
 
			player_talks = false, 
 
			handle = INVALID_CONVERSATION_HANDLE, 
 
			convo_thread = INVALID_THREAD_HANDLE, 
 
			max_wait_seconds = 60, 
 
			timer_thread = INVALID_THREAD_HANDLE, 
 
			priority = CONVO_PRIORITY_NORMAL, 
 
		},			 
 
 
 
		Kinzie_Convo_A = {  
			name = "mIntroVlad_con_kinzie_a",  
 
			player_talks = false, 
 
			handle = INVALID_CONVERSATION_HANDLE, 
 
			convo_thread = INVALID_THREAD_HANDLE, 
 
			max_wait_seconds = 60, 
 
			timer_thread = INVALID_THREAD_HANDLE, 
 
			priority = CONVO_PRIORITY_NORMAL, 
 
		},    
 
 
 
		destroy_music = {  
			name = "mission_intro_vlad_music", 
 
			player_talks = false, 
 
			handle = INVALID_CONVERSATION_HANDLE, 
 
			convo_thread = INVALID_THREAD_HANDLE, 
 
			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
 
			timer_thread = INVALID_THREAD_HANDLE, 
 
			priority = CONVO_PRIORITY_NORMAL, 
 
			persona_line = true, 
 
			speaker_name = mIntroVlad_group.vlad_group.vlad_npc, 
 
		},	 
 
 
 
		vlad_end = {  
			name = "mission_intro_vlad_end", 
 
			player_talks = false, 
 
			handle = INVALID_CONVERSATION_HANDLE, 
 
			convo_thread = INVALID_THREAD_HANDLE, 
 
			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
 
			timer_thread = INVALID_THREAD_HANDLE, 
 
			priority = CONVO_PRIORITY_NORMAL, 
 
			persona_line = true, 
 
			speaker_name = mIntroVlad_group.vlad_group.vlad_npc, 
 
		},	 
 
 
 
		grant_aura = {  
			name = "grant_power_-_aura", 
 
			player_talks = false, 
 
			handle = INVALID_CONVERSATION_HANDLE, 
 
			convo_thread = INVALID_THREAD_HANDLE, 
 
			max_wait_seconds = 10,	-- if the conversation doesn't complete before this time, kill it 
 
			timer_thread = INVALID_THREAD_HANDLE, 
 
			priority = CONVO_PRIORITY_NORMAL, 
 
			persona_line = true, 
 
			speaker_name = mIntroVlad_group.vlad_group.vlad_npc, 
 
		},	 
 
 
 
	} 
 
	 
 
	mIntroVlad_convo_queue =  
 
	{  
		--[[start_drive_queue = {   
			{ delay = 2.0, convo = mIntroVlad_convo.goto_first_checkpoint_nav },  
			{ delay = 4.0, convo = mIntroVlad_convo.goto_first_checkpoint_nav2 },  
			{ delay = 3.0, convo = mIntroVlad_convo.goto_first_checkpoint_nav3 },  
			{ delay = 5.0, convo = mIntroVlad_convo.goto_first_checkpoint_nav4 }  
		}, 
 
		]]-- 
 
	} 
 
	 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
  _______   _                            
 
 |__   __| (_)                           
 
	| |_ __ _  __ _  __ _  ___ _ __ ___  
 
	| | '__| |/ _` |/ _` |/ _ \ '__/ __| 
 
	| | |  | | (_| | (_| |  __/ |  \__ \ 
 
	|_|_|  |_|\__, |\__, |\___|_|  |___/ 
 
			   __/ | __/ |               
 
			  |___/ |___/                
 
 
 
]]-- 
 
-------------------------------------------------------------------------------------------------- 
 
	mIntroVlad_trigger =  
 
	{  
		-- = { 
 
		--	name = "_trigger", 
 
		--	hit = false, 
 
		-- 	last_hit_by = nil, -- 	last_hit_human = nil (set to the last human to enter the trigger in the default trigger callback) 
 
		--  (optional)callback = "mIntroVlad_function_name_cb" 
 
		--	(optional)marker = TRIGGER_LOCATION or TRIGGER_USE or custom or don't include for no marker 
 
		--  (optional)waypoint = true, 
 
		--  (optional)teleport_to = {  
		--						host = "host_nav", 
 
		--						client = "client_nav"  
 
		--					},		 
 
		--	(optional)conversation = mIntroVlad_convo.convo_name  -- play a conversation 
 
		--	(optional)next_trigger = "next_trigger_name" sets up next trigger when triggered (breadcrumbs) 
 
		--}, 
 
	Music_Trigger = 
 
	{  
		name = "Music_Trigger<001>", 
 
		hit = false, 
 
		marker = TRIGGER_USE, 
 
	}, 
 
 
 
	} 
 
 
 
-------------------------------------------------------------------------------------------------- 
 
																	  --[[ INTERROGATION DATA ]]-- 
 
-------------------------------------------------------------------------------------------------- 
 
	--mIntroVlad_interrogate = {  
	--	leader = {  
	--		target = mIntroVlad_group.friendly_fire.owner, 
 
	--		persona = "Interrogation", 
 
	--		objective = "mIntroVlad_INTERROGATE_OWNER", 
 
	--	--	(optional)conversation = mIntroVlad_convo.convo_name  -- play a conversation while interrogating 
 
	--	}, 
 
	--} 
 
		 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
   ____  _   _                
 
  / __ \| | | |               
 
 | |  | | |_| |__   ___ _ __  
 
 | |  | | __| '_ \ / _ \ '__| 
 
 | |__| | |_| | | |  __/ |    
 
  \____/ \__|_| |_|\___|_|    
 
							  
 
							  
 
]]-- 
 
-------------------------------------------------------------------------------------------------- 
 
 
 
mVladIntro_movers = {  
 
 
	hall_door = {  
		mover = "Door_Mover<001>", 
 
	}, 
 
} 
 
	mIntroVlad_homie =  
 
	{  
			vlad = "Vlad", 
 
	} 
 
	 
 
	mIntroVlad_tweakables =  
 
	{  
 
 
	} 
 
	mIntroVlad_runtime =  
 
	{  
		bDoorOpened = false, 
 
		bIntroCinemaDone = false, 
 
		SAMPLAYEDONCE = true, 
 
	} 
 
	mIntroVladVFX = 
 
	{  
 
 
		power_up = { name = "vfx_Altars_PowerUp", handle = "" },  
		teleport = { name = "Vfx_Hell_Teleport", handle = "" },  
	} 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
   _____ _                  _               _   ______                _   _                  
 
  / ____| |                | |             | | |  ____|              | | (_)                 
 
 | (___ | |_ __ _ _ __   __| | __ _ _ __ __| | | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
 
  \___ \| __/ _` | '_ \ / _` |/ _` | '__/ _` | |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
 
  ____) | || (_| | | | | (_| | (_| | | | (_| | | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
 
 |_____/ \__\__,_|_| |_|\__,_|\__,_|_|  \__,_| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
 
																							 
 
																							 
 
]]-- 
 
 
 
-- This is the primary entry point for the mission, and is responsible for starting up the mission 
 
-- at the specified checkpoint. 
 
-- CALLED FROM CODE 
 
-- 
 
-- start_checkpoint_name:	(string) The checkpoint the mission should begin at 
 
-- is_restart:					(bool) TRUE if the mission is restarting, FALSE otherwise 
 
-- 
 
function mIntroVlad_start(start_checkpoint_name, is_restart) 
 
	-- disable the map 
 
	cell_menu_disable_map(true) 
 
 
 
	mission_start_fade_out(0.0) 
 
	city_zone_swap("m_prison", true)  
	set_ped_override_density(.1) 
 
	set_traffic_density(.1) 
 
	parking_spot_disable_all(true) 
 
	-- set limiters  
 
	 tweak_table_override_value("Jump_super_max_height_scripted",26)  
	 tweak_table_override_value("Sprint_super_max_speed_scripted",28)  
 
 
 
 
		-- initialize systems 
 
	mission_startup(mIntroVlad_trigger, mIntroVlad_convo) 
 
	 
 
	-- HVS_BDF: we don't necessarily want to call load_persona() because this creates a 2D 
 
	-- version, which can prevent actual in-game characters from lip syncing their VO if 
 
	-- the 2D persona was loaded prior to their character being spawned. 
 
	-- In the case of PC characters, they are present in the world  
 
	-- and their characters should lip sync their VO.  Same with Vlad. 
 
	--load_persona(mIntro_persona.Johnny) 
 
	--load_persona(mIntro_persona.Kinzie) 
 
	--load_persona(mIntroVlad_persona.Vlad) 
 
 
 
	-- if using interrogations 
 
	--interrogate_startup(mIntroVlad_interrogate) 
 
	 
 
	local start_cp = get_table_by_name(mIntroVlad_checkpoint, MISSION_START_CHECKPOINT) 
 
 
 
	-- TEMPORARY: give player approximate loadout of weapons & superpowers 
 
	-- TODO: remove this before the game ships!!! 
 
	--hvUnlockLoadout("mIntroVlad")  
 
 
	teleport_coop(start_cp.host_start, start_cp.client_start, true) 
 
 
 
 
 
	-- Check if this mission starting from the beginning 
 
	if (start_checkpoint_name == start_cp.name) then 
 
		if (is_restart == false and mIntroVlad_scene.intro ~= "") then 
 
			local fade_in_after = false 
 
			--cutscene_play(mIntroVlad_scene.intro, nil, {start_cp.host_start, start_cp.client_start}, fade_in_after)  
		else 
 
 
 
		end 
 
		fade_out(0) 
 
	end 
 
 
 
		-- Handle mission initialization for the current checkpoint 
 
		mIntroVlad_initialize(start_checkpoint_name) 
 
 
 
		-- Run the mission from the current checkpoint 
 
		checkpoint_run_mission(mIntroVlad_checkpoint, start_checkpoint_name) 
 
 
 
		-- end cutscene 
 
		mission_end_success("mIntroVlad", nil)  
 
 
end 
 
 
 
-- This is the primary function responsible for cleaning up the entire mission 
 
-- CALLED FROM CODE (+++MUST RETURN IMMEDIATELY+++) 
 
-- 
 
function mIntroVlad_cleanup() 
 
	--[[ INSERT ANY MISSION SPECIFIC CLEAN-UP ]]-- 
 
	player_controls_enable(LOCAL_PLAYER) 
 
	if coop_is_active() then 
 
		player_controls_enable(REMOTE_PLAYER) 
 
	end 
 
	tweak_table_restore_value ("Jump_super_max_height_scripted")  
	tweak_table_restore_value ("Sprint_super_max_speed_scripted")  
 
 
	-- restore map 
 
	cell_menu_disable_map(false) 
 
	set_ped_override_density(-1) 
 
	set_traffic_density(1) 
 
	parking_spot_disable_all(false) 
 
		-- cleanup function 
 
	on_door_opened("", mVladIntro_movers.hall_door.mover)  
	CleanupTriggers() 
 
	on_death ( "", mIntroVlad_homie.vlad ) 
 
	on_dismiss ( "", mIntroVlad_homie.vlad ) 
 
	on_seamless_animated_moment_end("")  
	seamless_animated_moment_cleanup() 
 
	on_take_damage("", "demon_dj<001>")  
	--return normal player jump/sprint values 
 
	notoriety_set_min_and_max( "luchadores", 0, MAX_NOTORIETY_LEVEL ) 
 
	notoriety_set_min_and_max( "police", 0, MAX_NOTORIETY_LEVEL ) 
 
		mIntroVlad_cleanup_homies() 
 
 
 
		 
 
		player_super_attacks_enable( true )	 
 
	--make sure zone is off 
 
	city_zone_swap("m_prison", false)  
	-- teleport player 
 
 
 
 
 
	-- cleanup all threads 
 
	cleanup_threads(mIntroVlad_thread) 
 
	 
 
	-- run checkpoint cleanups (move into mission_shutdown?) 
 
	checkpoint_cleanup_mission(mIntroVlad_checkpoint) 
 
	 
 
	-- cleanup triggers, convos, kill_list and interrogations 
 
	mission_shutdown() 
 
	 
 
	-- cleanup all groups 
 
	cleanup_groups(mIntroVlad_group) 
 
 
 
 
 
		spawning_allow_cop_ambient_spawns(true) 
 
 
 
	if not mission_is_failed() then 
 
		--teleport_coop(mIntroVlad_navpoints.player_1_teleport_nav, mIntroVlad_navpoints.player_2_teleport_nav, true) 
 
		player_unlock_super_power( SUPERPOWER_AURA, LOCAL_PLAYER, true ) 
 
		if coop_is_active() then 
 
			player_unlock_super_power( SUPERPOWER_AURA, REMOTE_PLAYER, true ) 
 
		end 	 
 
	end 
 
 
 
end 
 
 
 
-- Called when the mission has ended with success 
 
-- CALLED FROM CODE (+++MUST RETURN IMMEDIATELY+++) 
 
-- 
 
function mIntroVlad_success() 
 
	--[[ INSERT ANY MISSION SPECIFIC SUCCESS STUFF ]]-- 
 
	-- Equip the superpower if we finished successfully 
 
	player_super_power_select( "aura", SYNC_ALL, "aura_coldfire" )	 
 
end 
 
 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
 
 
  _____       _ _   _       _ _           ______                _   _                  
 
 |_   _|     (_) | (_)     | (_)         |  ____|              | | (_)                 
 
   | |  _ __  _| |_ _  __ _| |_ _______  | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
 
   | | | '_ \| | __| |/ _` | | |_  / _ \ |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
 
  _| |_| | | | | |_| | (_| | | |/ /  __/ | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
 
 |_____|_| |_|_|\__|_|\__,_|_|_/___\___| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
 
																					   
 
																					   
 
]]-- 
 
 
 
-- Initialize the mission for the specified checkpoint 
 
-- 
 
-- checkpoint_name:		(string) Checkpoint to initialize the mission to 
 
-- 
 
function mIntroVlad_initialize(checkpoint_name) 
 
	-- Common initialization 
 
	mIntroVlad_initialize_common() 
 
 
 
	 
 
	-- Checkpoint specific initialization 
 
	checkpoint_init(mIntroVlad_checkpoint, checkpoint_name) 
 
 
 
	-- Remove any present subtitles 
 
	message_remove_all() 
 
 
 
	-- Start fading in  
 
	mission_start_fade_in() 
 
end 
 
 
 
-- Handle any common initialization 
 
-- 
 
function mIntroVlad_initialize_common() 
 
	--[[ INSERT ANY COMMON INITIALIZATION CODE HERE ]]-- 
 
	notoriety_set_min_and_max( "luchadores", 0, 0 ) 
 
	notoriety_set_min_and_max( "police", 0, 0 ) 
 
 
 
	--HVS_RCK[KING]7/7/14 - Can't do teleports during cleanup 
 
	mission_set_cancel_warp_location("prison_nav_tele<001>", "prison_nav_tele<002>")  
end 
 
 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
 
 
   _____ _               _                _       _     ______                _   _                  
 
  / ____| |             | |              (_)     | |   |  ____|              | | (_)                 
 
 | |    | |__   ___  ___| | ___ __   ___  _ _ __ | |_  | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
 
 | |    | '_ \ / _ \/ __| |/ / '_ \ / _ \| | '_ \| __| |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
 
 | |____| | | |  __/ (__|   <| |_) | (_) | | | | | |_  | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
 
  \_____|_| |_|\___|\___|_|\_\ .__/ \___/|_|_| |_|\__| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
 
							 | |                                                                     
 
							 |_|                                                                     
 
 
 
]]-- 
 
 
 
-- Initialize this checkpoint. 
 
-- 
 
-- mission_start: (bool) Whether we're initializing from a mission (re)start or from 
 
--					a natural play-through. 
 
-- 
 
function mIntroVlad_prison_init(mission_start) 
 
		teleport_coop("player_start_host", "player_start_client", true)	  
 
 
end 
 
								 
 
-- The next objective 
 
-- 
 
function mIntroVlad_prison_run() 
 
	 
 
	objective_text_clear(0) 
 
--	message( "Johnny: If this guy is in a prison in HELL you know he must be the kind of guy I like", 5, false ) 
 
	group_create(mIntroVlad_group.peds, true) 
 
 
 
	delay(.1) 
 
	set_animation_state(mIntroVlad_group.peds.ped_1, "fetal cry") 
 
	set_animation_state(mIntroVlad_group.peds.ped_1, "cower stand variant 1") 
 
	set_animation_state(mIntroVlad_group.peds.ped_2, "cower stand variant 3") 
 
	set_animation_state(mIntroVlad_group.peds.ped_3,  "cower stand variant 4") 
 
	set_animation_state(mIntroVlad_group.peds.ped_4, "cower stand variant 2") 
 
	set_animation_state(mIntroVlad_group.peds.ped_5, "cower stand variant 3") 
 
	set_animation_state(mIntroVlad_group.peds.ped_6, "cower stand variant 4") 
 
	set_animation_state(mIntroVlad_group.peds.ped_7, "cower stand variant 1") 
 
	group_create(mIntroVlad_group.vlad_group, true) 
 
	character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"back liedown") 
 
	set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "prison") 
 
 
 
	group_create(mIntroVlad_group.care_animals_group, true) 
 
	group_create(mIntroVlad_group.guards_group, true) 
 
	set_script_animation_state(mIntroVlad_group.guards_group.dj_1, "dance") 
 
	 
 
	on_take_damage("Stop_Dancing", "demon_dj<001>")  
 
 
	npc_leash_to_nav("demon_dj<001>", "Nav<007>", 1.0, false)  
	npc_leash_to_nav("demon_guard<001>", "Nav<001>", 2.0, false)  
	npc_leash_to_nav("demon_guard<002>", "Nav<002>", 2.0, false)  
	npc_leash_to_nav("demon_guard<003>", "Nav<003>", 2.0, false)  
	npc_leash_to_nav("demon_guard<004>", "Nav<004>", 2.0, false)  
	npc_leash_to_nav("demon_guard<005>", "Nav<005>", 2.0, false)  
	npc_leash_to_nav("demon_guard<006>", "Nav<006>", 2.0, false)  
 
 
	 
 
	set_ignore_ai_flag("demon_guard<001>",true)  
	set_ignore_ai_flag("demon_guard<002>",true)  
	set_ignore_ai_flag("demon_guard<003>",true)  
	set_ignore_ai_flag("demon_guard<004>",true)  
	set_ignore_ai_flag("demon_guard<005>",true)  
	set_ignore_ai_flag("demon_guard<006>",true)  
	set_ignore_ai_flag("head_guard<001>",true)  
	set_ignore_ai_flag("head_guard<002>",true)  
	set_ignore_ai_flag("head_guard<003>",true)  
	set_ignore_ai_flag(mIntroVlad_group.vlad_group.vlad_npc,true) 
 
	 
 
	turn_invulnerable ("demon_guard<001>", false)  
	turn_invulnerable ("demon_guard<002>", false)  
	turn_invulnerable ("demon_guard<003>", false)  
	turn_invulnerable ("demon_guard<004>", false)  
	turn_invulnerable ("demon_guard<005>", false)  
	turn_invulnerable ("demon_guard<006>", false)  
	turn_invulnerable ("demon_dj<001>", false)  
	turn_invulnerable("head_guard<001>",false)  
	turn_invulnerable("head_guard<002>",false)  
	turn_invulnerable("head_guard<003>",false)  
	turn_invulnerable(mIntroVlad_group.peds.ped_1, false) 
 
	turn_invulnerable(mIntroVlad_group.peds.ped_2, false) 
 
	turn_invulnerable(mIntroVlad_group.peds.ped_3, false) 
 
	turn_invulnerable(mIntroVlad_group.peds.ped_4, false) 
 
	turn_invulnerable(mIntroVlad_group.peds.ped_5, false) 
 
	turn_invulnerable(mIntroVlad_group.peds.ped_6, false) 
 
	turn_invulnerable(mIntroVlad_group.peds.ped_7, false) 
 
	turn_invulnerable(mIntroVlad_group.care_animals_group.care_devil_1, false) 
 
	turn_invulnerable(mIntroVlad_group.care_animals_group.care_devil_2, false) 
 
	turn_invulnerable("care_devil<003>", false)  
	turn_invulnerable("care_devil<004>", false)  
	turn_invulnerable("care_devil<005>", false)  
	turn_invulnerable("care_devil<006>", false)  
	turn_invulnerable("care_devil<007>", false)  
	turn_invulnerable("care_devil<008>", false)  
	turn_invulnerable("care_devil<009>", false)  
	turn_invulnerable("care_devil<010>", false)  
 
 
 
 
 
 
 
 
	human_gravity_enable ("demon_guard<001>", false)  
	human_gravity_enable ("demon_guard<002>", false)  
	human_gravity_enable ("demon_guard<003>", false)  
	human_gravity_enable ("demon_guard<004>", false)  
	human_gravity_enable ("demon_guard<005>", false)  
	human_gravity_enable ("demon_guard<006>", false)  
	human_gravity_enable ("demon_dj<001>", false)  
	human_gravity_enable("head_guard<001>",false)  
	human_gravity_enable("head_guard<002>",false)  
	human_gravity_enable("head_guard<003>",false)  
	human_gravity_enable(mIntroVlad_group.peds.ped_1, false) 
 
	human_gravity_enable(mIntroVlad_group.peds.ped_2, false) 
 
	human_gravity_enable(mIntroVlad_group.peds.ped_3, false) 
 
	human_gravity_enable(mIntroVlad_group.peds.ped_4, false) 
 
	human_gravity_enable(mIntroVlad_group.peds.ped_5, false) 
 
	human_gravity_enable(mIntroVlad_group.peds.ped_6, false) 
 
	human_gravity_enable(mIntroVlad_group.peds.ped_7, false) 
 
	human_gravity_enable(mIntroVlad_group.care_animals_group.care_devil_1, false) 
 
	human_gravity_enable(mIntroVlad_group.care_animals_group.care_devil_2, false) 
 
	human_gravity_enable("care_devil<003>", false)  
	human_gravity_enable("care_devil<004>", false)  
	human_gravity_enable("care_devil<005>", false)  
	human_gravity_enable("care_devil<006>", false)  
	human_gravity_enable("care_devil<007>", false)  
	human_gravity_enable("care_devil<008>", false)  
	human_gravity_enable("care_devil<009>", false)  
	human_gravity_enable("care_devil<010>", false)  
 
 
	character_collision_enable ("demon_guard<001>", false)  
	character_collision_enable ("demon_guard<002>", false)  
	character_collision_enable ("demon_guard<003>", false)  
	character_collision_enable ("demon_guard<004>", false)  
	character_collision_enable ("demon_guard<005>", false)  
	character_collision_enable ("demon_guard<006>", false)  
	character_collision_enable ("demon_dj<001>", false)  
	character_collision_enable("head_guard<001>",false)  
	character_collision_enable("head_guard<002>",false)  
	character_collision_enable("head_guard<003>",false)  
	character_collision_enable(mIntroVlad_group.peds.ped_1, false) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_2, false) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_3, false) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_4, false) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_5, false) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_6, false) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_7, false) 
 
	character_collision_enable(mIntroVlad_group.care_animals_group.care_devil_1, false) 
 
	character_collision_enable(mIntroVlad_group.care_animals_group.care_devil_2, false) 
 
	character_collision_enable("care_devil<003>", false)  
	character_collision_enable("care_devil<004>", false)  
	character_collision_enable("care_devil<005>", false)  
	character_collision_enable("care_devil<006>", false)  
	character_collision_enable("care_devil<007>", false)  
	character_collision_enable("care_devil<008>", false)  
	character_collision_enable("care_devil<009>", false)  
	character_collision_enable("care_devil<010>", false)  
	 
 
	delay(.1) 
 
	character_enable_superpower_immunity ("demon_guard<001>", true)  
	character_enable_superpower_immunity ("demon_guard<002>", true)  
	character_enable_superpower_immunity ("demon_guard<003>", true)  
	character_enable_superpower_immunity ("demon_guard<004>", true)  
	character_enable_superpower_immunity ("demon_guard<005>", true)  
	character_enable_superpower_immunity ("demon_guard<006>", true)  
	character_enable_superpower_immunity ("demon_dj<001>", true)  
	character_enable_superpower_immunity("head_guard<001>",true)  
	character_enable_superpower_immunity("head_guard<002>",true)  
	character_enable_superpower_immunity("head_guard<003>",true)  
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_1, true) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_2, true) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_3, true) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_4, true) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_5, true) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_6, true) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_7, true) 
 
	character_enable_superpower_immunity(mIntroVlad_group.care_animals_group.care_devil_1, true) 
 
	character_enable_superpower_immunity(mIntroVlad_group.care_animals_group.care_devil_2, true) 
 
	character_enable_superpower_immunity("care_devil<003>", true)  
	character_enable_superpower_immunity("care_devil<004>", true)  
	character_enable_superpower_immunity("care_devil<005>", true)  
	character_enable_superpower_immunity("care_devil<006>", true)  
	character_enable_superpower_immunity("care_devil<007>", true)  
	character_enable_superpower_immunity("care_devil<008>", true)  
	character_enable_superpower_immunity("care_devil<009>", true)  
	character_enable_superpower_immunity("care_devil<010>", true)  
 
 
 
 
	-- if this is the first time through. 
 
	on_door_opened("mIntroVlad_OpenDoor", mVladIntro_movers.hall_door.mover)  
	while mIntroVlad_runtime.bDoorOpened == false do 
 
			thread_yield() 
 
	end 
 
	 
 
	character_enable_superpower_immunity ("demon_guard<001>", false)  
	character_enable_superpower_immunity ("demon_guard<002>", false)  
	character_enable_superpower_immunity ("demon_guard<003>", false)  
	character_enable_superpower_immunity ("demon_guard<004>", false)  
	character_enable_superpower_immunity ("demon_guard<005>", false)  
	character_enable_superpower_immunity ("demon_guard<006>", false)  
	character_enable_superpower_immunity ("demon_dj<001>", false)  
	character_enable_superpower_immunity("head_guard<001>",false)  
	character_enable_superpower_immunity("head_guard<002>",false)  
	character_enable_superpower_immunity("head_guard<003>",false)  
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_1, false) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_2, false) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_3, false) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_4, false) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_5, false) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_6, false) 
 
	character_enable_superpower_immunity(mIntroVlad_group.peds.ped_7, false) 
 
	character_enable_superpower_immunity(mIntroVlad_group.care_animals_group.care_devil_1, false) 
 
	character_enable_superpower_immunity(mIntroVlad_group.care_animals_group.care_devil_2, false) 
 
	character_enable_superpower_immunity("care_devil<003>", false)  
	character_enable_superpower_immunity("care_devil<004>", false)  
	character_enable_superpower_immunity("care_devil<005>", false)  
	character_enable_superpower_immunity("care_devil<006>", false)  
	character_enable_superpower_immunity("care_devil<007>", false)  
	character_enable_superpower_immunity("care_devil<008>", false)  
	character_enable_superpower_immunity("care_devil<009>", false)  
	character_enable_superpower_immunity("care_devil<010>", false)  
	 
 
 
 
	character_collision_enable ("demon_guard<001>", true)  
	character_collision_enable ("demon_guard<002>", true)  
	character_collision_enable ("demon_guard<003>", true)  
	character_collision_enable ("demon_guard<004>", true)  
	character_collision_enable ("demon_guard<005>", true)  
	character_collision_enable ("demon_guard<006>", true)  
	character_collision_enable ("demon_dj<001>", true)  
	character_collision_enable("head_guard<001>",true)  
	character_collision_enable("head_guard<002>",true)  
	character_collision_enable("head_guard<003>",true)  
	character_collision_enable(mIntroVlad_group.peds.ped_1, true) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_2, true) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_3, true) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_4, true) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_5, true) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_6, true) 
 
	character_collision_enable(mIntroVlad_group.peds.ped_7, true) 
 
	character_collision_enable(mIntroVlad_group.care_animals_group.care_devil_1, true) 
 
	character_collision_enable(mIntroVlad_group.care_animals_group.care_devil_2, true) 
 
	character_collision_enable("care_devil<003>", true)  
	character_collision_enable("care_devil<004>", true)  
	character_collision_enable("care_devil<005>", true)  
	character_collision_enable("care_devil<006>", true)  
	character_collision_enable("care_devil<007>", true)  
	character_collision_enable("care_devil<008>", true)  
	character_collision_enable("care_devil<009>", true)  
	character_collision_enable("care_devil<010>", true)  
 
 
 
 
 
 
	set_ignore_ai_flag("demon_guard<001>",false)  
	set_ignore_ai_flag("demon_guard<002>",false)  
	set_ignore_ai_flag("demon_guard<003>",false)  
	set_ignore_ai_flag("demon_guard<004>",false)  
	set_ignore_ai_flag("demon_guard<005>",false)  
	set_ignore_ai_flag("demon_guard<006>",false)  
	set_ignore_ai_flag("head_guard<001>",false)  
	set_ignore_ai_flag("head_guard<002>",false)  
	set_ignore_ai_flag("head_guard<003>",false)  
 
 
	on_seamless_animated_moment_end("mVladIntro_Sam_Complete")  
	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 }  
	seamless_animated_moment_prep("SAM_Vlads_Intro", actor_list)  
	seamless_animated_moment_start("SAM_Vlads_Intro", actor_list)  
	delay(1.0) 
 
	audio_object_post_event("Play_CottenEyedJoe")  
	audio_object_post_event("Play_mIntroVlad_stingers")  
	clear_animation_state(mIntroVlad_group.vlad_group.vlad_npc) 
 
	while(mIntroVlad_runtime.bIntroCinemaDone == false) do 
 
		thread_yield() 
 
	end 
 
	set_ignore_ai_flag(mIntroVlad_group.vlad_group.vlad_npc,false) 
 
	 
 
	clear_animation_state(mIntroVlad_group.vlad_group.vlad_npc) 
 
	--	action_play(mIntroVlad_homie.vlad, "back liedown","",true); 
 
 
 
 
 
end 
 
 
 
-- Do any cleanup for this checkpoint. 
 
-- 
 
-- (+++THIS IS CALLED FROM MISSION CLEANUP, MUST RETURN IMMEDIATELY+++) 
 
-- 
 
-- mission_exit: (bool) Whether we're exiting the mission entirely, or just 
 
--					moving on to the next checkpoint. 
 
-- 
 
function mIntroVlad_prison_cleanup(mission_exit) 
 
 
 
	--[[ INSERT ANY MISSION SPECIFIC CLEAN-UP ]]-- 
 
 
 
 
 
end 
 
function mIntroVlad_cp2_init(mission_start) 
 
	if mission_start then 
 
		group_create(mIntroVlad_group.peds, true) 
 
		audio_object_post_event("Play_CottenEyedJoe")  
		delay(.2) 
 
		set_animation_state(mIntroVlad_group.peds.ped_1, "fetal cry") 
 
		set_animation_state(mIntroVlad_group.peds.ped_2, "cower stand variant 3") 
 
		set_animation_state(mIntroVlad_group.peds.ped_3,  "cower stand variant 4") 
 
		set_animation_state(mIntroVlad_group.peds.ped_4, "cower stand variant 2") 
 
		set_animation_state(mIntroVlad_group.peds.ped_5, "cower stand variant 3") 
 
		set_animation_state(mIntroVlad_group.peds.ped_6, "cower stand variant 4") 
 
		set_animation_state(mIntroVlad_group.peds.ped_7, "cower stand variant 1") 
 
		delay(.2) 
 
		group_create(mIntroVlad_group.vlad_group, true) 
 
		character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"back liedown") 
 
--		set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "prison") 
 
 
 
 
 
		--set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "prison") 
 
		character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"back liedown") 
 
 
 
		--turn_invulnerable(name[, allow_player_damage]) 
 
 
 
		group_create(mIntroVlad_group.care_animals_group, true) 
 
		delay(.2) 
 
		group_create(mIntroVlad_group.guards_group, true) 
 
		for i, wave_member in pairs( mIntroVlad_group.care_animals_group.members ) do 
 
			turn_invulnerable (wave_member) 
 
		end 
 
		for i, wave_member in pairs( mIntroVlad_group.guards_group.members) do 
 
			turn_invulnerable (wave_member) 
 
		end 
 
		set_animation_state(mIntroVlad_group.guards_group.dj_1, "dance") 
 
	 
 
		on_take_damage("Stop_Dancing", "demon_dj<001>")  
		npc_leash_to_nav("demon_dj<001>", "Nav<007>", 1.0, false)  
		npc_leash_to_nav("demon_guard<001>", "Nav<001>", 2.0, false)  
		npc_leash_to_nav("demon_guard<002>", "Nav<002>", 2.0, false)  
		npc_leash_to_nav("demon_guard<003>", "Nav<003>", 2.0, false)  
		npc_leash_to_nav("demon_guard<004>", "Nav<004>", 2.0, false)  
		npc_leash_to_nav("demon_guard<005>", "Nav<005>", 2.0, false)  
		npc_leash_to_nav("demon_guard<006>", "Nav<006>", 2.0, false)  
		teleport_coop("player_start_client_cp2", "player_start_host_cp2", true)	  
	end 
 
end 
 
function mIntroVlad_cp2_run() 
 
	turn_vulnerable ("demon_guard<001>")  
	turn_vulnerable ("demon_guard<002>")  
	turn_vulnerable ("demon_guard<003>")  
	turn_vulnerable ("demon_guard<004>")  
	turn_vulnerable ("demon_guard<005>")  
	turn_vulnerable ("demon_guard<006>")  
	turn_vulnerable ("demon_dj<001>")  
	turn_vulnerable("head_guard<001>")  
	turn_vulnerable("head_guard<002>")  
	turn_vulnerable("head_guard<003>")  
	turn_vulnerable(mIntroVlad_group.peds.ped_1) 
 
	turn_vulnerable(mIntroVlad_group.peds.ped_2) 
 
	turn_vulnerable(mIntroVlad_group.peds.ped_3) 
 
	turn_vulnerable(mIntroVlad_group.peds.ped_4) 
 
	turn_vulnerable(mIntroVlad_group.peds.ped_5) 
 
	turn_vulnerable(mIntroVlad_group.peds.ped_6) 
 
	turn_vulnerable(mIntroVlad_group.peds.ped_7) 
 
	turn_vulnerable(mIntroVlad_group.care_animals_group.care_devil_1) 
 
	turn_vulnerable(mIntroVlad_group.care_animals_group.care_devil_2) 
 
	turn_vulnerable("care_devil<003>")  
	turn_vulnerable("care_devil<004>")  
	turn_vulnerable("care_devil<005>")  
	turn_vulnerable("care_devil<006>")  
	turn_vulnerable("care_devil<007>")  
	turn_vulnerable("care_devil<008>")  
	turn_vulnerable("care_devil<009>")  
	turn_vulnerable("care_devil<010>")  
	party_add(mIntroVlad_homie.vlad, LOCAL_PLAYER) 
 
	marker_add( mIntroVlad_homie.vlad, MINIMAP_ICON_SAINTS, OI_ASSET_REVIVE ) 
 
 
 
	human_ignore_next_death_anim(mIntroVlad_homie.vlad, true) 
 
	--action_play(mIntroVlad_homie.vlad, "back liedown","",true); 
 
	human_enter_downed( mIntroVlad_homie.vlad ) 
 
	-- set up vlad 
 
 
 
	 
 
	 
 
	 
 
	follower_set_can_abandon( mIntroVlad_homie.vlad, false ) 
 
	on_death ( "mIntroVlad_failure_vlad_died_cb", mIntroVlad_homie.vlad ) 
 
	on_dismiss ( "mIntroVlad_failure_dismissed_cb", mIntroVlad_homie.vlad ) 
 
	party_set_dismissable(false) 
 
 
 
 
 
	if mIntroVlad_group.guards_group.head_guard ~= nil then 
 
		ai_add_enemy_target(mIntroVlad_group.guards_group.head_guard, LOCAL_PLAYER, ATTACK_NOW) 
 
	end 
 
	 
 
	--this is stuff about waiting until the homie is revived 
 
	objective_text(0,"GM_DRAINED_OBJ_REVIVE_VLAD","","",SYNC_ALL,OI_ASSET_REVIVE) 
 
	while (human_is_downed( mIntroVlad_homie.vlad ) == true)do 
 
		thread_yield() 
 
	end 
 
	while (character_is_dead(mIntroVlad_homie.vlad) == true)do 
 
		thread_yield() 
 
	end 
 
 
 
	marker_remove( mIntroVlad_homie.vlad )	 
 
	character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"") 
 
	--set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "") 
 
	objective_text_clear(0) 
 
	objective_text(0,"MVLADINTRO_OBJECTIVE_ENEMIES","","",SYNC_ALL,OI_ASSET_KILL) 
 
	kill_list_add(mIntroVlad_group.guards_group.members, OI_ASSET_KILL) 
 
 
 
	delay( 1.0 ) 
 
	character_add_prop(mIntroVlad_group.vlad_group.vlad_npc, "Vlad-ColdFireBuff") 
 
	-- Pick up your homie	 
 
	--mIntroVlad_wait_until_homie_revived( Blackbeard ) 
 
 
 
	-- if player is johnny, play johnny line. If not, play kinzie line 
 
	if character_get_anim_set(LOCAL_PLAYER) == "PLYM" then 
 
		convo_start(mIntroVlad_convo.Gat_Convo_A) 
 
	else 
 
		convo_start(mIntroVlad_convo.Kinzie_Convo_A) 
 
	end    
 
 
 
	delay(8.0) 
 
 
 
	group_create(mIntroVlad_group.winged_group, true) 
 
	kill_list_add(mIntroVlad_group.winged_group.members, OI_ASSET_KILL) 
 
 
 
	delay(6.0) 
 
 
 
	group_create(mIntroVlad_group.shadow_group, true) 
 
	kill_list_add(mIntroVlad_group.shadow_group.members, OI_ASSET_KILL) 
 
	 
 
	-- HVS_JBG 7/25/2014 - since we're indoors, we want them to have navpoints. 
 
	-- this way they won't fallback on the raycast method of teleporting and wind up out in the world somewhere. 
 
	human_use_teleport_navpoints(mIntroVlad_group.shadow_group.members[1], true) 
 
	human_use_teleport_navpoints(mIntroVlad_group.shadow_group.members[2], true) 
 
	 
 
	human_clear_teleport_navpoints(mIntroVlad_group.shadow_group.members[1]) 
 
	human_clear_teleport_navpoints(mIntroVlad_group.shadow_group.members[2]) 
 
	 
 
	for index, navp in pairs( mIntroVlad_shadow_demon_navpoints.navs ) do 
 
		human_add_teleport_navpoint(mIntroVlad_group.shadow_group.members[1], navp) 
 
		human_add_teleport_navpoint(mIntroVlad_group.shadow_group.members[2], navp) 
 
	end 
 
		 
 
	kill_list_wait_for_complete() 
 
	objective_text_clear(0) 
 
 
 
	delay(2.0) 
 
		 
 
	convo_start(mIntroVlad_convo.destroy_music)  
 
	 
 
	objective_text(0, "MVLADINTRO_OBJECTIVE_MUSIC", "", "", SYNC_ALL, OI_ASSET_USE ) 
 
	trigger_setup( mIntroVlad_trigger.Music_Trigger ) 
 
 
 
	while (mIntroVlad_trigger.Music_Trigger.hit == false) do 
 
		thread_yield() 
 
	end 
 
 
 
	audio_object_post_event("Stop_CottenEyedJoe")  
	objective_text_clear(0) 
 
	delay( 1.0 ) 
 
	convo_start(mIntroVlad_convo.vlad_end) 
 
convo_wait_for_end() 
 
 
 
	player_controls_disable(LOCAL_PLAYER) 
 
	if coop_is_active() then 
 
		player_controls_enable(REMOTE_PLAYER) 
 
	end 
 
	cutscene_play(mIntroVlad_scene.outro, nil, {mIntroVlad_navpoints.player_1_teleport_nav, mIntroVlad_navpoints.player_2_teleport_nav}, true )  
	party_dismiss(mIntroVlad_homie.vlad) 
 
	teleport( mIntroVlad_homie.vlad, mIntroVlad_navpoints.vlad_teleport_nav) 
 
	character_set_animation_overrides(mIntroVlad_group.vlad_group.vlad_npc,"") 
 
	set_animation_state(mIntroVlad_group.vlad_group.vlad_npc, "stand") 
 
	if cutscene_check_exiting() then 
 
		thread_yield()		 
 
	end 
 
	convo_start(mIntroVlad_convo.grant_aura) 
 
	delay(3) 
 
		-- Have player(s) fully power up (non-blocking) 
 
	local anim_name = "altars_powerup" 
 
	local morph_name = anim_name 
 
	local force_play = false 
 
	local stand_still = true 
 
	local zero_movement = true 
 
	effect_play_on_human( mIntroVladVFX.power_up.name, LOCAL_PLAYER, "spine2" ) 
 
	action_play_non_blocking(LOCAL_PLAYER, anim_name, morph_name, force_play, stand_still, zero_movement, "tele_host") 
 
	if coop_is_active() then 
 
		effect_play_on_human( mIntroVladVFX.power_up.name, REMOTE_PLAYER, "spine2"  ) 
 
		action_play_non_blocking(REMOTE_PLAYER, anim_name, morph_name, force_play, stand_still, zero_movement, "tele_client") 
 
	end 
 
	 
 
	-- Wait for player to react 
 
	delay(6) 
 
	fade_out(1) 
 
	fade_out_block() 
 
	force_spawn_contacts() 
 
	player_super_power_select( "Aura", SYNC_ALL, "aura_coldfire" ) 
 
end 
 
 
 
function mIntroVlad_cp2_cleanup(mission_exit) 
 
 
 
end 
 
 
 
------------------------------------ 
 
-- 
 
-- Checkpoint helper functions 
 
-- 
 
------------------------------------ 
 
 
 
------------------------------------ 
 
-- 
 
-- Checkpoint callback functions 
 
-- 
 
------------------------------------ 
 
function Stop_Dancing() 
 
	set_script_animation_state(mIntroVlad_group.guards_group.dj_1, nil) 
 
end 
 
 
 
 
 
function mIntroVlad_OpenDoor() 
 
	mIntroVlad_runtime.bDoorOpened = true 
 
 
 
end 
 
function mIntroVlad_failure_vlad_died_cb() 
 
	mission_end_failure("mIntroVlad", "GM_MINTROVLAD_VLAD_DIED")  
end 
 
 
 
function mIntroVlad_failure_dismissed_cb() 
 
	mission_end_failure("mIntroVlad", "GM_MINTROVLAD_FAIL_VLAD_DIS")  
end 
 
------------------------------------ 
 
-- 
 
-- Checkpoint thread functions 
 
-- 
 
------------------------------------ 
 
 
 
 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
   _____                                        ______                _   _                  
 
  / ____|                                      |  ____|              | | (_)                 
 
 | |     ___  _ __ ___  _ __ ___   ___  _ __   | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
 
 | |    / _ \| '_ ` _ \| '_ ` _ \ / _ \| '_ \  |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
 
 | |___| (_) | | | | | | | | | | | (_) | | | | | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
 
  \_____\___/|_| |_| |_|_| |_| |_|\___/|_| |_| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
 
																							 
 
																							 
 
]]-- 
 
 
 
function mVladIntro_Sam_Complete() 
 
	mIntroVlad_runtime.bIntroCinemaDone = true 
 
end 
 
 
 
	function CleanupTriggers() 
 
		mIntroVlad_trigger.Music_Trigger.callback = "" 
 
	end 
 
 
 
function mIntroVlad_cleanup_homies() 
 
	if mIntroVlad_homie.vlad ~= nil then 
 
		on_death("", mIntroVlad_homie.vlad)  
		on_dismiss("", mIntroVlad_homie.vlad)  
	end 
 
end 
 
 
 
--Reinforcement spawn 
 
function mIntroVlad_attack(group) 
 
	local block = true 
 
	local should_run = true 
 
	local should_fire = false 
 
	group_create( group.name, true, block ) 
 
	for index, npc in pairs( group.members ) do 
 
		ai_do_scripted_move( npc, group.destination, should_run, should_fire ) 
 
	end 
 
end 
 
 
 
--Thread Killer 
 
function mIntroVlad_safe_thread_kill( thread ) 
 
	 
 
	if( thread ~= nil )	then 
 
		if( thread ~= INVALID_THREAD_HANDLE) then 
 
			thread_kill( thread ) 
 
			thread = INVALID_THREAD_HANDLE 
 
		end 
 
	end 
 
 
 
end 
 
--[[ 
 
function mIntroVlad_wait_until_homie_revived( homie ) 
 
 
 
	-- Doesn't matter who revived them, so long as someone did. 
 
	while(human_is_downed( homie ) == false)do 
 
		thread_yield() 
 
	end 
 
	objective_text_clear(1) 
 
end 
 
]]-- 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
   _____      _ _ _                _      ______                _   _                  
 
  / ____|    | | | |              | |    |  ____|              | | (_)                 
 
 | |     __ _| | | |__   __ _  ___| | __ | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
 
 | |    / _` | | | '_ \ / _` |/ __| |/ / |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
 
 | |___| (_| | | | |_) | (_| | (__|   <  | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
 
  \_____\__,_|_|_|_.__/ \__,_|\___|_|\_\ |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
 
																					   
 
																					   
 
]]-- 
 
 
 
function mIntroVlad_failure_vald_died_cb() 
 
	mission_end_failure("mIntroVlad", "GM_MINTROVLAD_FAIL_VLAD_DIED")  
end 
 
 
 
function mIntroVlad_failure_dismissed_cb() 
 
	mission_end_failure("mIntroVlad", "GM_MINTROVLAD_FAIL_VLAD_DIS")  
end 
 
-------------------------------------------------------------------------------------------------- 
 
--[[ 
 
 
 
  _______ _                        _   ______                _   _                  
 
 |__   __| |                      | | |  ____|              | | (_)                 
 
	| |  | |__  _ __ ___  __ _  __| | | |__ _   _ _ __   ___| |_ _  ___  _ __  ___  
 
	| |  | '_ \| '__/ _ \/ _` |/ _` | |  __| | | | '_ \ / __| __| |/ _ \| '_ \/ __| 
 
	| |  | | | | | |  __/ (_| | (_| | | |  | |_| | | | | (__| |_| | (_) | | | \__ \ 
 
	|_|  |_| |_|_|  \___|\__,_|\__,_| |_|   \__,_|_| |_|\___|\__|_|\___/|_| |_|___/ 
 
																				    
 
																				    
 
]]--