./mm_k_03.lua

  1.  
  2. --[[ 
  3. 	MM_K_02.lua 
  4. 	SR3 Mission Script 
  5. 	DATE: 10-29-2010 
  6. 	AUTHOR:	Jimmy Cross 
  7. ]]-- 
  8.  
  9.  
  10. -- Debug flags -- 
  11.  
  12. -- Tweakable Parameters -- 
  13.  
  14. -- Groups -- 
  15.  
  16. -- Navpoints -- 
  17.  
  18. -- Triggers -- 
  19. 	 
  20. -- Characters -- 
  21.  
  22. -- Vehicles -- 
  23.  
  24. -- Mesh Movers -- 
  25.  
  26. -- Text -- 
  27.  
  28.  
  29. -- Threads -- 
  30.  
  31.  
  32. -- Checkpoints -- 
  33. 	MM_K_03_checkpoint = { 
  34. 		start = { 
  35. 			name = MISSION_START_CHECKPOINT, 
  36. 		} 
  37. 	} 
  38.  
  39. -- Cutscenes -- 
  40. 	CUTSCENE_MISSION_INTRO = "" 
  41. 	CUTSCENE_MISSION_OUTRO = "" 
  42.  
  43. -- Conversations -- 
  44.  
  45. 		 
  46. -- Other -- 
  47.  
  48.  
  49. -- ************************* 
  50. -- 
  51. -- Standard functions 
  52. -- 
  53. -- ************************* 
  54.  
  55. -- This is the primary entry point for the mission, and is responsible for starting up the mission 
  56. -- at the specified checkpoint. 
  57. -- CALLED FROM CODE 
  58. -- 
  59. -- checkpoint:	The checkpoint the mission should begin at 
  60. -- is_restart:					TRUE if the mission is restarting, FALSE otherwise 
  61. -- 
  62. function MM_K_03_start(checkpoint, is_restart) 
  63. 	-- Check if this mission starting from the beginning 
  64. 	if (checkpoint == MM_K_03_checkpoint.start.name) then 
  65. 		if (is_restart == false) then 
  66. 			fade_out(0) 
  67. 			fade_out_block() 
  68. 			mission_end_to_activity("MM_K_03", "_A_GA_NW_01") 
  69. 		end 
  70. 	end 
  71.  
  72.  
  73. 	-- Handle mission initialization for the current checkpoint 
  74. 	--MM_K_03_initialize(checkpoint) 
  75.  
  76. 	-- Run the mission from the current checkpoint 
  77. 	--MM_K_03_run(checkpoint) 
  78. 	 
  79. end 
  80.  
  81. -- This is the primary function responsible for running the entire mission from start to finish. 
  82. -- 
  83. -- first_checkpoint:	The first checkpoint to begin running the mission at 
  84. -- 
  85. function MM_K_03_run(first_checkpoint) 
  86. 	local current_checkpoint = first_checkpoint 
  87.  
  88. 	-- Run the mission from the beginning 
  89. 	if( current_checkpoint == MM_K_03_checkpoint.start.name  ) then 
  90. 		--[[ INSERT PROCESSING FOR THE FIRST CHECKPOINT HERE ]]-- 
  91.  
  92. 	end 
  93. end 
  94.  
  95. -- This is the primary function responsible for cleaning up the entire mission 
  96. -- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++) 
  97. -- 
  98. function MM_K_03_cleanup() 
  99. 	--[[ INSERT ANY MISSION SPECIFIC CLEAN-UP ]]-- 
  100.  
  101. end 
  102.  
  103. -- Called when the mission has ended with success 
  104. -- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++) 
  105. -- 
  106. function MM_K_03_success() 
  107. 	--[[ INSERT ANY MISSION SPECIFIC SUCCESS STUFF ]]-- 
  108. 	 
  109. end 
  110.  
  111.  
  112. -- ************************* 
  113. -- 
  114. -- Local functions 
  115. -- 
  116. -- ************************* 
  117.  
  118. -- Initialize the mission for the specified checkpoint 
  119. -- 
  120. -- checkpoint:		Checkpoint to initialize the mission to 
  121. -- 
  122. function MM_K_03_initialize(checkpoint) 
  123. 	-- Make sure the screen is completly faded out 
  124. 	mission_start_fade_out(0.0) 
  125.  
  126. 	-- Set the mission author 
  127. 	set_mission_author("Jimmy Cross") 
  128.  
  129. 	-- Common initialization 
  130. 	MM_K_03_initialize_common() 
  131.  
  132. 	-- Checkpoint specific initialization 
  133. 	MM_K_03_initialize_checkpoint(checkpoint) 
  134.  
  135. 	-- Start fading in  
  136. 	mission_start_fade_in() 
  137.  
  138. end 
  139.  
  140.  
  141. -- *************************************************** 
  142. -- MM_K_03_run Helper Functions 
  143. -- *************************************************** 
  144.  
  145.  
  146. -- *************************************************** 
  147. -- MM_K_03_initialize Helper Functions 
  148. -- *************************************************** 
  149.  
  150. -- Handle any common initialization 
  151. -- 
  152. function MM_K_03_initialize_common() 
  153. 	--[[ INSERT ANY COMMON INITIALIZATION CODE HERE ]]-- 
  154. 	 
  155. end 
  156.  
  157. -- Checkpoint specific initialization 
  158. -- 
  159. -- checkpoint:		The checkpoint to be initialized 
  160. function MM_K_03_initialize_checkpoint(checkpoint) 
  161.  
  162. 	if (checkpoint == MM_K_03_checkpoint.start.name) then 
  163. 		--[[ INSERT ANY INITIALIZATION CODE FOR STARTING THE MISSION AT THE BEGINNING ]]-- 
  164.  
  165. 	end 
  166.  
  167. end 
  168.  
  169.  
  170. -- *************************************************** 
  171. -- Miscellaneous MM_K_03 Helper Funcrtions 
  172. -- *************************************************** 
  173. function MM_K_03_clear_trigger(trigger) 
  174. 	on_trigger( "", trigger ) 
  175. 	trigger_enable( trigger, false ) 
  176. 	marker_remove_trigger( trigger, SYNC_ALL ) 
  177. end 
  178.  
  179.  
  180. -- ************************* 
  181. -- 
  182. -- Callback functions 
  183. -- 
  184. -- ************************* 
  185.  
  186. -- Trigger callback, used to handle the start of the activity and silent failing of the mission 
  187. -- 
  188. --  
  189.  
  190. -- ************************* 
  191. -- 
  192. -- Thread functions 
  193. -- 
  194. -- *************************