./mm_z_02.lua

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