--[[
mm_m16_5.lua
SR3 Mission Script
DATE: 11/22/2010
AUTHOR: Jimmy Cross
]]--
-- Debug flags --
-- Tweakable Parameters --
-- Groups --
-- Navpoints --
-- Triggers --
-- Characters --
-- Vehicles --
-- Mesh Movers --
-- Text --
-- Threads --
-- Checkpoints --
CHECKPOINT_START = MISSION_START_CHECKPOINT -- defined in ug_lib.lua
-- Cutscenes --
-- Conversations --
MM_M16_5_convo = {
shaundi_call = {
name = "MM_M16_5_Shaundi_Kidnapped",
handle = INVALID_CONVERSATION_HANDLE,
shaundi_persona_name = "Phone_Call",
shaundi_persona_id = INVALID_PERSONA_HANDLE,
},
}
-- Other --
-- *************************
--
-- Standard functions
--
-- *************************
-- This is the primary entry point for the mission, and is responsible for starting up the mission
-- at the specified checkpoint.
-- CALLED FROM CODE
--
-- mm_m16_5_checkpoint: The checkpoint the mission should begin at
-- is_restart: TRUE if the mission is restarting, FALSE otherwise
--
function mm_m16_5_start(mm_m16_5_checkpoint, is_restart)
-- Check if this mission starting from the beginning
if (mm_m16_5_checkpoint == CHECKPOINT_START) then
if (is_restart == false) then
-- First time playing mission
end
--fade_out(0)
end
-- Handle mission initialization for the current checkpoint
mm_m16_5_initialize(mm_m16_5_checkpoint)
-- Run the mission from the current checkpoint
mm_m16_5_run(mm_m16_5_checkpoint)
end
-- This is the primary function responsible for running the entire mission from start to finish.
--
-- first_checkpoint: The first checkpoint to begin running the mission at
--
function mm_m16_5_run(first_checkpoint)
audio_persona_load_2d( MM_M16_5_convo.shaundi_call.shaundi_persona_name)
MM_M16_5_convo.shaundi_call.handle = audio_conversation_load(MM_M16_5_convo.shaundi_call.name)
-- Play the conversation
audio_conversation_play(MM_M16_5_convo.shaundi_call.handle)
-- Wait for the conversation to end
audio_conversation_wait_for_end( MM_M16_5_convo.shaundi_call.handle )
MM_M16_5_convo.shaundi_call.handle = INVALID_CONVERSATION_HANDLE
--[[
MM_M16_5_convo.shaundi_call.kinzie_persona_id = audio_persona_load_2d( MM_M16_5_convo.shaundi_call.shaundi_persona_name )
MM_M16_5_convo.shaundi_call.kinzie_persona_id = audio_persona_load_2d( MM_M16_5_convo.shaundi_call.shaundi_persona_name )
MM_M16_5_convo.shaundi_call.handle = audio_conversation_load( MM_M16_5_convo.shaundi_call.name )
-- Start the Shaundi phone call
audio_conversation_play( MM_M16_5_convo.shaundi_call.handle )
audio_conversation_wait_for_end( MM_M16_5_convo.shaundi_call.handle )
MM_M16_5_convo.shaundi_call.handle = INVALID_CONVERSATION_HANDLE
audio_persona_remove_2d( MM_M16_5_convo.shaundi_call.kinzie_persona_id )
MM_M16_5_convo.shaundi_call.kinzie_persona_id = INVALID_PERSONA_HANDLE
]]--
mission_set_completed("mm_m16_5")
--unlock the next mission
--mission_unlock("m17")
mission_end_silently(false)
mission_autosave()
end
-- This is the primary function responsible for cleaning up the entire mission
-- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++)
--
function mm_m16_5_cleanup()
--[[ INSERT ANY MISSION SPECIFIC CLEAN-UP ]]--
end
-- Called when the mission has ended with success
-- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++)
--
function mm_m16_5_success()
--[[ INSERT ANY MISSION SPECIFIC SUCCESS STUFF ]]--
end
-- *************************
--
-- Local functions
--
-- *************************
-- Initialize the mission for the specified checkpoint
--
-- checkpoint: Checkpoint to initialize the mission to
--
function mm_m16_5_initialize(checkpoint)
-- Make sure the screen is completly faded out
--mission_start_fade_out(0.0)
-- Set the mission author
set_mission_author("Jimmy Cross")
-- Common initialization
mm_m16_5_initialize_common()
-- Checkpoint specific initialization
mm_m16_5_initialize_checkpoint(checkpoint)
-- Start fading in
mission_start_fade_in()
end
-- ***************************************************
-- mm_m16_5_run Helper Functions
-- ***************************************************
-- ***************************************************
-- mm_m16_5_initialize Helper Functions
-- ***************************************************
-- Handle any common initialization
--
function mm_m16_5_initialize_common()
--[[ INSERT ANY COMMON INITIALIZATION CODE HERE ]]--
end
-- Checkpoint specific initialization
--
-- checkpoint: The checkpoint to be initialized
function mm_m16_5_initialize_checkpoint(checkpoint)
if (checkpoint == CHECKPOINT_START) then
--[[ INSERT ANY INITIALIZATION CODE FOR STARTING THE MISSION AT THE BEGINNING ]]--
end
end
-- ***************************************************
-- Miscellaneous mm_m16_5 Helper Funcrtions
-- ***************************************************
-- *************************
--
-- Callback functions
--
-- *************************
-- *************************
--
-- Thread functions
--
-- *************************