./mm_k_04.lua

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