--[[
dlc1_mm_05.lua
SR3 Mission Script
DATE: 10-20-2011
AUTHOR: Randy Oberlerchner
]]--
-- Debug flags --
-- Tweakable Parameters --
-- Groups --
dlc1_mm_05_group = {
}
-- Navpoints --
-- Triggers --
dlc1_mm_05_trigger = {
}
-- Characters --
-- Vehicles --
-- Mesh Movers --
-- Text --
-- Threads --
-- Checkpoints --
dlc1_mm_05_checkpoint = {
start = {
name = MISSION_START_CHECKPOINT,
}
}
-- Cutscenes --
CUTSCENE_MISSION_INTRO = ""
CUTSCENE_MISSION_OUTRO = ""
-- Conversations --
dlc1_mm_05_convo = {
--[[mission_start = {
name = "dlc1_mm_05_convo_1",
handle = INVALID_CONVERSATION_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
--
-- checkpoint: The checkpoint the mission should begin at
-- is_restart: TRUE if the mission is restarting, FALSE otherwise
--
function dlc1_mm_05_start(checkpoint, is_restart)
-- Check if this mission starting from the beginning
if (checkpoint == dlc1_mm_05_checkpoint.start.name) then
if (is_restart == false) then
-- First time playing mission
-- Play an intro cutscene???
if (CUTSCENE_MISSION_INTRO ~= "") then
cutscene_play(CUTSCENE_MISSION_INTRO)
end
end
fade_out(0)
fade_out_block()
mission_end_to_activity("dlc1_mm_05", "dlc1_a_tbp_01")
end
-- Handle mission initialization for the current checkpoint
--dlc1_mm_05_initialize(checkpoint)
-- Run the mission from the current checkpoint
--dlc1_mm_05_run(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 dlc1_mm_05_run(first_checkpoint)
local current_checkpoint = first_checkpoint
-- Run the mission from the beginning
if( current_checkpoint == dlc1_mm_05_checkpoint.start.name ) then
--[[ INSERT PROCESSING FOR THE FIRST CHECKPOINT HERE ]]--
end
end
-- This is the primary function responsible for cleaning up the entire mission
-- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++)
--
function dlc1_mm_05_cleanup()
--[[ INSERT ANY MISSION SPECIFIC CLEAN-UP ]]--
end
-- Called when the mission has ended with success
-- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++)
--
function dlc1_mm_05_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 dlc1_mm_05_initialize(checkpoint)
-- Make sure the screen is completly faded out
mission_start_fade_out(0.0)
-- Set the mission author
set_mission_author("Randy Oberlerchner")
-- Common initialization
dlc1_mm_05_initialize_common()
-- Checkpoint specific initialization
dlc1_mm_05_initialize_checkpoint(checkpoint)
-- Start fading in
mission_start_fade_in()
end
-- ***************************************************
-- dlc1_mm_05_run Helper Functions
-- ***************************************************
-- ***************************************************
-- dlc1_mm_05_initialize Helper Functions
-- ***************************************************
-- Handle any common initialization
--
function dlc1_mm_05_initialize_common()
--[[ INSERT ANY COMMON INITIALIZATION CODE HERE ]]--
end
-- Checkpoint specific initialization
--
-- checkpoint: The checkpoint to be initialized
function dlc1_mm_05_initialize_checkpoint(checkpoint)
if (checkpoint == dlc1_mm_05_checkpoint.start.name) then
--[[ INSERT ANY INITIALIZATION CODE FOR STARTING THE MISSION AT THE BEGINNING ]]--
end
end
-- ***************************************************
-- Miscellaneous dlc1_mm_05 Helper Funcrtions
-- ***************************************************
function dlc1_mm_05_clear_trigger(trigger)
on_trigger( "", trigger )
trigger_enable( trigger, false )
marker_remove_trigger( trigger, SYNC_ALL )
end
-- *************************
--
-- Callback functions
--
-- *************************
-- *************************
--
-- Thread functions
--
-- *************************