--[[
mm_m1_5.lua
SR3 Mission Script
DATE: 12-05-10
AUTHOR: John Karczewski
]]--
-- Debug flags --
-- Tweakable Parameters --
-- Groups --
MM_M1_5_group = {
--[[ = {
name = "name from editor",
members = { "optional", "list", "of", "members" },
},
= {
name = "next group name"
},]]
}
-- Navpoints --
-- Triggers --
-- Characters --
-- Vehicles --
-- Mesh Movers --
-- Text --
-- Threads --
-- Checkpoints --
CHECKPOINT_START = MISSION_START_CHECKPOINT -- defined in ug_lib.lua
-- Cutscenes --
CUTSCENE_MISSION_INTRO = ""
CUTSCENE_MISSION_OUTRO = ""
-- Conversations --
MM_M1_5_convo = {
--[[ = {
name = "file_name without voice (_bm, _wm, _bf...",
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
--
-- mm_m1_5_checkpoint: The checkpoint the mission should begin at
-- is_restart: TRUE if the mission is restarting, FALSE otherwise
--
function mm_m1_5_start(mm_m1_5_checkpoint, is_restart)
-- Check if this mission starting from the beginning
if (mm_m1_5_checkpoint == CHECKPOINT_START) 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)
end
-- Handle mission initialization for the current checkpoint
mm_m1_5_initialize(mm_m1_5_checkpoint)
-- Run the mission from the current checkpoint
mm_m1_5_run(mm_m1_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_m1_5_run(first_checkpoint)
customization_create_character()
while ( customization_screen_is_ready() == false ) do
thread_yield()
end
--mission_start_fade_in()
fade_in( START_FADE_IN_TIME )
while(customization_creation_is_open()) do
thread_yield()
end
-- Player customization complete, mark the mission complete, fail silently, then save
mission_end_silently()
mission_autosave()
mission_set_next_mission("m02")
end
-- This is the primary function responsible for cleaning up the entire mission
-- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++)
--
function mm_m1_5_cleanup()
end
-- Called when the mission has ended with success
-- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++)
--
function mm_m1_5_success()
end
-- *************************
--
-- Local functions
--
-- *************************
-- Initialize the mission for the specified checkpoint
--
-- checkpoint: Checkpoint to initialize the mission to
--
function mm_m1_5_initialize(checkpoint)
-- Make sure the screen is completly faded out
--mission_start_fade_out(0.0)
fade_out( 0.0 )
-- Set the mission author
set_mission_author("John Karczewski")
-- Common initialization
mm_m1_5_initialize_common()
-- Checkpoint specific initialization
mm_m1_5_initialize_checkpoint(checkpoint)
-- Start fading in
--mission_start_fade_in()
end
-- ***************************************************
-- mm_m1_5_run Helper Functions
-- ***************************************************
-- ***************************************************
-- mm_m1_5_initialize Helper Functions
-- ***************************************************
-- Handle any common initialization
--
function mm_m1_5_initialize_common()
--[[ INSERT ANY COMMON INITIALIZATION CODE HERE ]]--
end
-- Checkpoint specific initialization
--
-- checkpoint: The checkpoint to be initialized
function mm_m1_5_initialize_checkpoint(checkpoint)
if (checkpoint == CHECKPOINT_START) then
--[[ INSERT ANY INITIALIZATION CODE FOR STARTING THE MISSION AT THE BEGINNING ]]--
end
end
-- ***************************************************
-- Miscellaneous mm_m1_5 Helper Funcrtions
-- ***************************************************
-- *************************
--
-- Callback functions
--
-- *************************
-- *************************
--
-- Thread functions
--
-- *************************